W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > July to September 2002

Extending with mixed content

From: Eric Jain <Eric.Jain@isb-sib.ch>
Date: Tue, 27 Aug 2002 09:24:31 -0600
Message-Id: <5.1.0.14.1.20020827092420.0261a850@localhost>
To: W3C XML Schema Comments list <www-xml-schema-comments@w3.org>




I am having some problems designing an extensible schema for a specific
application. Let's say I have an element:

<name>P12345</name>

The content must conform to a pattern like [OPQ]\d{5}, which is easily
expressible in XML Schema. Now, we need to allow people to extend any
element in the following manner:

<name>
     P12345
     <note>...</note>
</name>

This can only be allowed by setting content="mixed"; unfortunately the
original content can now no longer be controlled in any way. Our current
workaround is not to use *any* content, but to put *everything* into
attributes:

<name value="P12345"/>

<name value="P12345">
     <note>...</note>
</name>

Ugly. Let me know if this issue (if it is one in fact) is being addressed in
XML Schema 1.1, and excuse me if this has already been discussed.


--
Eric Jain

Swiss Institute of Bioinformatics
1, rue Michel Servet
1211 Geneva 4
Switzerland
Received on Tuesday, 27 August 2002 16:26:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:13:01 GMT