Specify the value for an element that references several att
This should cover W3C XML Schema, Relax NG and DTD related problems.
Specify the value for an element that references several att
Hello to everyone. Thanks for reading this.
Im working with XML Schema to specify graphs. In the graph we have nodes, and each node can have several attribute (with a key and value), but I want to force the user to always add one attribute with a specific key and three posible values… ¿Is this possible in XML SCHEMA without defining a new type or element…
This is the XML SCHEMA for the attribute
<!-- Global Attributes -->
<xsd:attributeGroup name="global-atts">
<xsd:attribute name="id" type="string.type" />
<xsd:attribute name="name" type="string.type" />
<xsd:attribute name="label" type="string.type" />
</xsd:attributeGroup>
<!-- Value Attribute -->
<xsd:attributeGroup name="attribute-value">
<xsd:attribute name="value" type="string.type" />
</xsd:attributeGroup>
<!-- Type Attribute -->
<xsd:attributeGroup name="attribute-type">
<xsd:attribute name="type" type="object.type" />
</xsd:attributeGroup>
<!-- Att Element -->
<xsd:element name="att">
<xsd:complexType mixed="true">
<xsd:sequence>
<xsd:element ref="att" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attributeGroup ref="global-atts" />
<xsd:attributeGroup ref="attribute-value" />
<xsd:attributeGroup ref="attribute-type" />
</xsd:complexType>
</xsd:element>
And this for the node…
<!-- Simple Node (Structural Node) -->
<xsd:complexType name="simpleNode">
<xsd:sequence>
<xsd:element ref="att" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attributeGroup ref="global-atts" />
</xsd:complexType>
And i want all node to be like this…
<node ...>
<att name=â€Status†value=â€â€> THIS ALWAYS HAVE TO BE WITH THAT NAME.
<att…
<att…
</node>
Thanxs for all
Im working with XML Schema to specify graphs. In the graph we have nodes, and each node can have several attribute (with a key and value), but I want to force the user to always add one attribute with a specific key and three posible values… ¿Is this possible in XML SCHEMA without defining a new type or element…
This is the XML SCHEMA for the attribute
<!-- Global Attributes -->
<xsd:attributeGroup name="global-atts">
<xsd:attribute name="id" type="string.type" />
<xsd:attribute name="name" type="string.type" />
<xsd:attribute name="label" type="string.type" />
</xsd:attributeGroup>
<!-- Value Attribute -->
<xsd:attributeGroup name="attribute-value">
<xsd:attribute name="value" type="string.type" />
</xsd:attributeGroup>
<!-- Type Attribute -->
<xsd:attributeGroup name="attribute-type">
<xsd:attribute name="type" type="object.type" />
</xsd:attributeGroup>
<!-- Att Element -->
<xsd:element name="att">
<xsd:complexType mixed="true">
<xsd:sequence>
<xsd:element ref="att" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attributeGroup ref="global-atts" />
<xsd:attributeGroup ref="attribute-value" />
<xsd:attributeGroup ref="attribute-type" />
</xsd:complexType>
</xsd:element>
And this for the node…
<!-- Simple Node (Structural Node) -->
<xsd:complexType name="simpleNode">
<xsd:sequence>
<xsd:element ref="att" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attributeGroup ref="global-atts" />
</xsd:complexType>
And i want all node to be like this…
<node ...>
<att name=â€Status†value=â€â€> THIS ALWAYS HAVE TO BE WITH THAT NAME.
<att…
<att…
</node>
Thanxs for all
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service