[ 
https://issues.apache.org/jira/browse/XERCESC-2118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16161782#comment-16161782
 ] 

David Schloss commented on XERCESC-2118:
----------------------------------------

Update: I've tried adding setLoadExternalDTD(false) and 
setSkipDTDValidation(true) to the parser and end up with the same result.

> Validation against xml.xsd causes attribute declaration error
> -------------------------------------------------------------
>
>                 Key: XERCESC-2118
>                 URL: https://issues.apache.org/jira/browse/XERCESC-2118
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: DOM, Validating Parser (XML Schema)
>    Affects Versions: 3.0.1, 3.1.1
>         Environment: CentOS 6.9 64-bit, Virtual Box VM.
>            Reporter: David Schloss
>         Attachments: child.xsd, datatypes.dtd, DOMPrint.cpp, parent.xsd, 
> XMLSchema.dtd, xml-valid.xml, xml.xsd
>
>
> Using a slightly modified version of the DOMPrint sample application, I am 
> encountering an issue validating an XML file against specified schemas. 
> Message: attribute 'xpathDefaultNamespace' cannot appear in global schema 
> declarations
> I've attached the modified DOMPrint source to this ticket. The modifications 
> add the setExternalNoNamespaceSchemaLocation and 
> setExternalNoNamespaceSchemaLocation calls on the parser at lines 386 amd 
> 387. The arguments passed to each are the locations of the schema files, and 
> the space separated namespace and schema file locations, respectively. The 
> call to DOMPrint is as follows:
> DOMPrint -v=always -n -s xml-valid.xml
> The error does not occur if the following line is removed from the xml.xsd 
> schema file:
> <!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" 
> >
> I've attached the following files for replication purposes:
> * xml-valid.xml
> * parent.xsd
> * child.xsd
> * xml.xsd
> * XMLSchema.dtd
> * datatypes.dtd
> * DOMPrint.cpp



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to