[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Restricting Element Order with Attribute Values
Hi, Is it possible to restrict elements based upon the order of element attributes? For example can I restrict <server dn="myserver.com" id="server392" ip="xxx.xx.xxx.xxx"> <webstats uri="myserver.com/webalizer" type="http"/> <webstats uri="myserver.com/bandwidth" type="bytes"/> </server> So I can say one cannot have a <webstats type='bytes'/> without first having a <webstats type='http'/> <xs:complexType name="webstatsType"> <xs:attribute name="type"> <xs:simpleType> <xs:restriction base="xs:string"> <!-- <xs:pattern value="http|bytes"></xs:pattern> --> <xs:enumeration value="http"/> <xs:enumeration value="bytes"/> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="uri" type="xs:anyURI"></xs:attribute> <xs:attribute name="username" type="xs:string"></xs:attribute> <xs:attribute name="pwd" type="xs:string"></xs:attribute> </xs:complexType> Or should I not be using attributes for this type restriction and have <bytes> elements inside <http> elements? I'm thinking if I can restrict the order of these elements in my xsd files I can use less <xsl:if> in my xsl files when sorting the different types of web statistics available for each web site inside each server. Thanks. Regards, Rudi.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|