[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XML Schema - How to define any element of type Foe
Hi Christophe, Here's some idea based on XSD 1.1 assertions.<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:complexType name="parent"> <xs:sequence> <xs:any processContents="skip"/> </xs:sequence> <xs:assert test="*/not(node())"/> <xs:assert test="count(*/@*) eq 2"/> <xs:assert test="*/xs:positiveInteger(@end) ge */xs:positiveInteger(@start)"/> </xs:complexType> <xs:element name="X" type="parent"/> </xs:schema> You won't need an explicit complex type definition named "Foe". <?xml version="1.0" encoding="UTF-8"?> <X> <A end="2" start="1"/> </X> On 9 March 2017 at 14:37, <cmarchand@oxiane.com> wrote: Hello, -- Regards, Mukul Gandhi
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
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
|