W3C home > Mailing lists > Public > xmlschema-dev@w3.org > November 2011

Using assert in a complexType with complexContent

From: Costello, Roger L. <costello@mitre.org>
Date: Thu, 3 Nov 2011 20:13:00 +0000
To: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
Message-ID: <B5FEE00B53CF054AA8439027E8FE177501BC2C@IMCMBX04.MITRE.ORG>
Hi Folks,

I got an error with the assert element in this complexType:

    <xs:complexType name="authorType" mixed="true">
            <xs:extension base="property">
                    <xs:element ref="Person" />
        <xs:assert test="not(normalize-space(string-join((.)/text(), '')))" />

The error message says:

   Element xs:assert cannot appear here: expected no more elements

I thought that it was legal to position the assert there? Apparently not. What is the proper way to do this?

Received on Thursday, 3 November 2011 20:13:35 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:19 UTC