Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


redefining or restricting children of a predefined element

From: Mario Madunic <hajduk@----.--->
To: xmlschema-dev@--.---
Date: 8/20/2007 1:51:00 AM
Any help with the following will be greatly apreciated.

I would like to change the emphasis child of web to not contain an instance of
web itself. This is the sort of recursion I want to avoid. I've looked at
redefine and restriction but seem to be missing something. I do not want to
define a new emphasis element within web as it is already defined and want to do
the restriction within web itself (<xs:element ref="emphasis" /> and used
throughout the schema).


Here is a copy of the elements in question without the include statements. The
child model is much bigger, children have been removed for brevity :) 

<xs:element name="web" id="web">
  <xs:complexType mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element ref="emphasis" />
      <xs:element ref="imageInline" />
      <xs:element ref="strong" />
    </xs:choice>
    <xs:attributeGroup ref="attributeStandardInlineGroup" />
    <xs:attribute name="uri" type="xs:anyURI" use="optional" />
    <xs:attribute ref="target" use="optional" />
  </xs:complexType>
</xs:element>

<xs:element name="emphasis" id="emphasis">
  <xs:complexType mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element ref="email" />
      <xs:element ref="strong" />
      <xs:element ref="web" />
    </xs:choice>
    <xs:attributeGroup ref="attributeInlineGroup" />
  </xs:complexType>
</xs:element>

Marijan (Mario) Madunic



From mike@s... Mon Aug 20 21:30:14 2007
Received: from aji.w3.org ([133.27


transparent
Print
Mail
Like It
Disclaimer
.

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.

.
.

transparent

transparent