Community
    • Login

    XML Tools and Validating using Assert(ion) Tags

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    5 Posts 2 Posters 1.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • FlurDeChikenF
      FlurDeChiken
      last edited by

      Does the XML Tools plugin support XSD 1.1? I’m using version 3.0.3.0. 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”
      xsi:noNamespaceSchemaLocation=“schema.xsd”>
      <StudentId>BT00001</StudentId>
      <LastName>Tomson00001</LastName>
      <FirstName>Bob00001</FirstName>
      <MiddleName></MiddleName>
      <low>0</low>
      <high>1</high>
      </Person>

      XSD Document
      <?xml version=“1.0” encoding=“UTF-8”?>
      <xs:schema
      xmlns:xs=“http://www.w3.org/2001/XMLSchema”>
      <xs:element name=“Person”>
      xs:complexType
      xs:sequence
      <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:sequence>
      <xs:assert test=“low < high”/>
      </xs:complexType>
      </xs:element>
      </xs:schema>

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

      EkopalypseE 1 Reply Last reply Reply Quote 0
      • EkopalypseE
        Ekopalypse @FlurDeChiken
        last edited by

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

        XSD 1.1

        Looks like not at the moment, see here.

        FlurDeChikenF 2 Replies Last reply Reply Quote 2
        • FlurDeChikenF
          FlurDeChiken @Ekopalypse
          last edited by

          @Ekopalypse

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

          1 Reply Last reply Reply Quote 1
          • FlurDeChikenF
            FlurDeChiken @Ekopalypse
            last edited by

            @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!

            EkopalypseE 1 Reply Last reply Reply Quote 3
            • EkopalypseE
              Ekopalypse @FlurDeChiken
              last edited by

              @FlurDeChiken

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

              1 Reply Last reply Reply Quote 2
              • First post
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors