Subject: [xsl] Schema question From: "Leo Studer leo.studer@xxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Tue, 16 Jan 2018 09:44:25 -0000 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XML output ugly, Adam Retter adam.ret | Thread | Re: [xsl] Schema question, Michael Kay mike@xxx |
Re: [xsl] XML output ugly, Michele R Combs mrro | Date | Re: [xsl] Schema question, Michael Kay mike@xxx |
Month |