|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Schema question
Hello
I am not sure whether this is the right list for my question. Since you are
all XML gurus I ask it anyway ;-)
I am using SAXON 9.7.0.19 with Oxygen 19.1. and have the following schema that
finally does its job
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
targetNamespace="http://contestants <http://contestants/>.com"
xmlns="http://contestants <http://contestants/>.com"
xmlns:cont="http://contestants <http://contestants/>.com"
version="1.1">
<xs:element name="contestants">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="16" maxOccurs="16" ref="contestant"/>
</xs:sequence>
<xs:assert test="every $cont in cont:contestant[position() lt last()]
satisfies
$cont/@seed lt
$cont/following-sibling::cont:contestant[1]/@seed"/>
</xs:complexType>
</xs:element>
<xs:element name="contestant">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="seed" use="required"
type="xs:positiveInteger"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:schema>
I wrote the assert without the namespace prefix cont: which did not work. Any
explication way I need to prefix here even though the default namespace is the
same namespace and I can reference to an element without prefixing.
Thanks in advance
Leo
|
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
|

Cart








