8000 line and column numbers missing in XmlValidate call · Issue #14 · OpenBD/openbd-core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on May 7, 2024. It is now read-only.

line and column numbers missing in XmlValidate call #14

Open
laserbyte opened this issue Sep 15, 2015 · 2 comments
Open

line and column numbers missing in XmlValidate call #14

laserbyte opened this issue Sep 15, 2015 · 2 comments

Comments

@laserbyte
Copy link

When calling XmlValidate with an XSD to validate and XML files the column and line numbers are missing:

[Error] :-1:-1: cvc-length-valid: Value '' with length = '0' is not facet-valid with respect to length '2' for type 'UsState'.
@a1anw2
Copy link
Contributor
a1anw2 commented Sep 15, 2015

Can you provide a code snippet and supporting files to reproduce? thank you

@laserbyte
Copy link
Author

people.xml

<Peoples xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="">
    <People>
        <firstname>James</firstname>
    </People>
</Peoples>

people.xsd

<?xml version="1.0"?>
<xs:schema id="Peoples" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
  <xs:element name="Peoples">
    <xs:complexType>
      <xs:sequence minOccurs="1" maxOccurs="unbounded">
        <xs:element name="People">
          <xs:complexType>
            <xs:all>
              <xs:element name="firstname" minOccurs="1" >
                  <xs:simpleType>
                    <xs:restriction base="xs:string">
                      <xs:minLength value="1"/>
                      <xs:maxLength value="50"/>
                    </xs:restriction>
                  </xs:simpleType>       
              </xs:element>  
              <xs:element name="lastname" minOccurs="1" >
                  <xs:simpleType>
                    <xs:restriction base="xs:string">
                      <xs:minLength value="1"/>
                      <xs:maxLength value="50"/>
                    </xs:restriction>
                  </xs:simpleType>       
              </xs:element>  
             <xs:element name="mid
6BC7
initial" minOccurs="0">
                  <xs:simpleType>
                    <xs:restriction base="xs:string">
                      <xs:maxLength value="50"/>
                    </xs:restriction>
                  </xs:simpleType>  
              </xs:element>
              <xs:element name="email" minOccurs="0" >
                  <xs:simpleType>
                    <xs:restriction base="xs:string">
                      <xs:maxLength value="50"/>
                    </xs:restriction>
                  </xs:simpleType>  
              </xs:element> 
            </xs:all>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

valid.cfm

<cfset xmlContents = FileRead( ExpandPath("people.xml") ) />
<cfset results = XmlValidate(xmlContents, ExpandPath("people.xsd") ) />
<cfdump var="#results#" />

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0