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
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--