XSD: Extensible like XSLT

U

Udo

Hello,

XSLT-defined elements can have additional attributes - is this possible
with XSD, too?


Thanks and greetings
Udo
 
M

Martin Honnen

Udo wrote:

XSLT-defined elements can have additional attributes - is this possible
with XSD, too?

Yes, I think so, there are certain elements (e.g. appinfo) in a schema
that can have any user defined content and attributes in other
namespaces are allowed too.
I can't currently find the text saying that in the XML schema
specification but the schema for schemas
<http://www.w3.org/TR/xmlschema-1/#normative-schemaSchema> has this type
definition:

<xs:complexType name="openAttrs">
<xs:annotation>
<xs:documentation>
This type is extended by almost all schema types
to allow attributes from other namespaces to be
added to user schemas.
</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:restriction base="xs:anyType">
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,002
Messages
2,570,261
Members
46,859
Latest member
VallieMcKe

Latest Threads

Top