 |
 |
 |
Hi everyone,
I hope I'm posting to the correct list.. I've been looking for a
schema list to post my question and found that a few questions have
been asked here,, so hopefully I'm in the right spot.
My issue concerns having an element that can be placed anywhere. I my
context, which I think describes the problem well, I have a element
that indicates whether text in a document has changed. So for example
I here is a example schema:
<xsd:element name="_Inline" type="xsd:anyType" abstract="true"/>
<xsd:element name="italic" substitutionGroup="_Inline"/>
<xsd:element name="bold" substitutionGroup="_Inline"/>
<xsd:element name="new" substitutionGroup="_Inline"/>
<xsd:complexType name="Inline" mixed="true">
<xsd:sequence>
<xsd:element ref="_Inline" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="root">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="sentence">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="sentencenumber" type="Inline"/>
<xsd:element name="sentencetext" type="Inline"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="article">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="articlenumber" type="Inline"/>
<xsd:element name="articletext" type="Inline"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
Ok, so my <new> element is the one I'm concerned about. because I have
it as inline there is no problem putting it within number or text
elements.. However, whole sections of articles, sentences and both
could be <new>.
ex
<root>
<new>
<sentence>
<sentencenumber>1234</sentencenumber>
<sentencetext>This is some sentencetext</sentencetext>
</sentence>
<article>
<articlenumber>1235</articlenumber>
<articletext>Thsi is articletext</articletext>
</article>
</new>
<new>
<article>
<articlenumber>1235</articlenumber>
<articletext>Thsi is articletext</articletext>
</article>
</new>
</root>
Right, so I know I could go through the process of declaring the <new>
element for every possible occurence throughout the schema, but my
real schema is a wack larger than the snippit above, so I'm really
hope there's another way of saying "This element may be found
ANYWHERE"..
Any thoughts would be greatly appreciated.
Thank you
|
 | 

|  |
These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.
|  |
| |
 |
 |
 |