[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Schema question

Subject: Schema question
From: "Leo Studer leo.studer@xxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 16 Jan 2018 09:44:25 -0000
 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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.