From e52a1299f5cc121d84d7fc3b4f01594fcae030c1 Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Tue, 5 Feb 2013 08:59:49 -0500 Subject: documented xmlschema sphinx extension options/flags --- doc/exts/xmlschema.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'doc/exts/xmlschema.py') diff --git a/doc/exts/xmlschema.py b/doc/exts/xmlschema.py index 8a68902e1..727b4bbd0 100644 --- a/doc/exts/xmlschema.py +++ b/doc/exts/xmlschema.py @@ -10,6 +10,30 @@ Provides the following directives: * ``.. xml:attributegroup:: ``: Document an attributeGroup * ``.. xml:element:: ``: Document an XML element +Each directive supports the following options: + +* ``:namespace: ``: Specify the namespace of the given entity +* ``:nochildren:``: Do not generate documentation for child entities +* ``:noattributegroups:``: Do not generate documentation about + attribute groups +* ``:nodoc:``: Do not include the documentation included in the entity + annotation +* ``:notext:``: Do not generate documentation about the text content + of the entity +* ``:onlyattrs: ,``: Only generate documentation about the + comma-separated list of attributes given +* ``:requiredattrs: ,attr>``: Claim that the attributes named in + the given comma-separated list are required, even if they are not + flagged as such in the schema. +* ``:linktotype: [,]``: If used as a flag, link to + documentation on all child types and elements. If a list is given, + only link to those types given. (The default is to generate full + inline docs for those types.) +* ``:noautodep: [,]``: Do not automatically generate docs + for any dependent entities. +* ``:inlinetypes: ,``: Override a default ``:linktotype:`` + setting for the given types. + Provides the following roles to link to the objects documented above: * ``:xml:schema:````: Link to an XML schema @@ -759,6 +783,8 @@ class XMLDomain(Domain): def resolve_xref(self, env, fromdocname, builder, typ, target, node, contnode): + if typ in ['complexType', 'simpleType']: + typ = 'type' if target in self.data[typ]: docname, labelid = self.data[typ][target] else: -- cgit v1.2.3-1-g7c22