Re: XML document embedded in the appinfo element?

Hi Sven,

> Im working on my first rather large XML schema. IŽd like to have a
> structured documentation for each element in my schema, that is
> readible through DOM and XPath. The structure of the documentation
> should stay the same for every element. So I wonder if it is
> possible to embedd a full XML document in the <appinfo> element that
> is compliant with another documentation schema.

Sure you can. You can use your own elements within either xs:appinfo
or xs:documentation - use xs:appinfo if it contains
data-designed-for-computer-interpretation and xs:documentation if it
contains documentation-designed-for-human-interpretation.

> If its possible, are there any traps regarding namespaces?

I don't think there are any particular traps. I'd use your own
namespace for the documentation elements if I were you.

If you wanted to check that the documentation in your schemas matched
the documentation schema that you'd created, it looks like you'd have
to make a copy of the schema for schemas and change the declarations
for xs:documentation and xs:annotation.

[Henry, or whoever's responsible for the schema-for-schemas - I think
 it would be a good idea to change the schema-for-schemas so that the
 complex types for the xs:documentation and xs:annotation elements
 were defined at the top level, so that they could be redefined in
 these situations?]

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/

Received on Saturday, 12 January 2002 07:30:12 UTC