You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Mukul Gandhi (JIRA)" <xe...@xml.apache.org> on 2016/07/22 08:44:20 UTC

[jira] [Updated] (XERCESJ-1628) Error when inserting invalid characters in the value of the maxVersion or maxVersion attributes

     [ https://issues.apache.org/jira/browse/XERCESJ-1628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mukul Gandhi updated XERCESJ-1628:
----------------------------------
    Fix Version/s: 2.12.0

> Error when inserting invalid characters in the value of the maxVersion or maxVersion attributes
> -----------------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1628
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1628
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema 1.1 Structures
>    Affects Versions: 2.11.0
>            Reporter: Octavian Nadolu
>            Assignee: Mukul Gandhi
>            Priority: Trivial
>             Fix For: 2.12.0
>
>
> If I insert invalid characters in the value of the maxVersion or maxVersion attributes, Xerces reports an error with the reason "null".
> In the SchemaDOMParser, when the value of the attributes is parsed, a NumberFormatException is thrown, that has the message null. This message is then passed to the error reporter.
> I tested on the xml-schema-1.1-dev branch.  
> --------- Schema.xsd -------------------
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
>     vc:maxVersion="1.1s" vc:minVersion="1.0a"> </xs:schema>
> -----------------------------------------
> ---------- Error ------------------
> s4s-att-invalid-value: Invalid attribute value for 'minVersion' in element 'schema'. Recorded reason: null
> 	at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:196)
> 	at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:132)
> 	at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:394)
> 	at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:325)
> 	at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:282)
> 	at org.apache.xerces.impl.xs.opti.SchemaDOMParser.checkVersionControlAttributes(SchemaDOMParser.java:635)
> 	at org.apache.xerces.impl.xs.opti.SchemaDOMParser.startElement(SchemaDOMParser.java:260)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:283)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(XMLNSDocumentScannerImpl.java:733)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1754)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324)
> 	at org.apache.xerces.impl.xs.opti.SchemaParsingConfig.parse(SchemaParsingConfig.java:627)
> 	at org.apache.xerces.impl.xs.opti.SchemaParsingConfig.parse(SchemaParsingConfig.java:683)
> 	at org.apache.xerces.impl.xs.opti.SchemaDOMParser.parse(SchemaDOMParser.java:587)
> 	at org.apache.xerces.impl.xs.traversers.XSDHandler.getSchemaDocument(XSDHandler.java:2446)
> 	at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:644)
> 	at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:644)
> 	at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:611)
> 	at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:577)
> 	at org.apache.xerces.jaxp.validation.BaseSchemaFactory.newSchema(BaseSchemaFactory.java:223)
> 	at org.apache.xerces.jaxp.validation.XMLSchema11Factory.newSchema(XMLSchema11Factory.java:1)
> --------------------------------



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org