XML Tools and Validating using Assert(ion) Tags

  • Does the XML Tools plugin support XSD 1.1? I’m using version I ask because I’m trying to use Assert tags but the file fails validation. When I try to validate, I get the following validation error: Element ‘xs:assert’ is not allowed in this context.

    I’ve searched all over to try and determine what I’m doing wrong but to no avail.

    I’m just trying to do a POC for this before I start tackling my larger project. My POC consists of a simple XML and XSD document.

    XML Document
    <?xml version=“1.0” encoding=“UTF-8”?>
    <Person xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance

    XSD Document
    <?xml version=“1.0” encoding=“UTF-8”?>
    <xs:element name=“Person”>
    <xs:element name=“StudentId” type=“xs:string” minOccurs=“1” maxOccurs=“1”/>
    <xs:element name=“LastName” type=“xs:string” minOccurs=“1” maxOccurs=“1”/>
    <xs:element name=“FirstName” type=“xs:string” minOccurs=“1” maxOccurs=“1”/>
    <xs:element name=“MiddleName” type=“xs:string” minOccurs=“0” maxOccurs=“1”/>
    <xs:element name=“low” type=“xs:integer” minOccurs=“0” maxOccurs=“1”/>
    <xs:element name=“high” type=“xs:integer” minOccurs=“0” maxOccurs=“1”/>
    <xs:assert test=“low < high”/>

    Anyone’s assistance would be greatly appreaciated. Thank you!

  • @Mark-Vance said in XML Tools and Validating using Assert(ion) Tags:

    XSD 1.1

    Looks like not at the moment, see here.

  • @Ekopalypse

    Well, that’s a bummer…thx for the response!

  • @Ekopalypse
    The link you provided that points to GitHub led me to a valid Python 1.1 validating tool and I was able to validate my 1.1 XSD. Thanks again!

  • @FlurDeChiken

    How could I have missed that? Thanks for mentioning it.
    Another arrow in my quiver. :)

Log in to reply