You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Boris Kolpackov (JIRA)" <xe...@xml.apache.org> on 2009/11/18 15:22:39 UTC
[jira] Closed: (XERCESC-1263) Abstract type not handled correctly
by cached grammar
[ https://issues.apache.org/jira/browse/XERCESC-1263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Boris Kolpackov closed XERCESC-1263.
------------------------------------
Resolution: Fixed
Assignee: Boris Kolpackov
The fix is in SVN.
> Abstract type not handled correctly by cached grammar
> -----------------------------------------------------
>
> Key: XERCESC-1263
> URL: https://issues.apache.org/jira/browse/XERCESC-1263
> Project: Xerces-C++
> Issue Type: Bug
> Components: Validating Parser (XML Schema)
> Affects Versions: 3.1.0
> Reporter: Matthew Berry
> Assignee: Boris Kolpackov
> Fix For: 3.1.0
>
>
> Details:
> --------
> I have managed to narrow the problem I am having to a simple test case. In the schema, I have an abstract type defined and am using xsi:type with a concrete type in the data file.
> If I have a xsi:schemaLocation attribute in my data file, then the test Xml file passes the validation. (I have used DOMCount to verify this)
> If I remove xsi:schemaLocation and instead from my source code call loadGrammar() and setFeature(XMLUni::fgXercesUseCachedGrammarInParse, true), I am getting the following error messages:
> Message: Element paramInstance is declared with a type that is
> abstract. Use xsi:type to specify a non-abstract type
> Message: Attribute 'name' is not declared for
> element 'paramInstance'
> Schema:
> -------
> <xsd:schema targetNamespace="http://www.temp.org" xmlns:tmp="http://www.temp.org" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <!--
> Define a 'paramInstance' element
> NOTE: We use an abstract base to allow for extension
> -->
> <xsd:complexType name="ParamInstanceType" abstract="true" />
> <xsd:element name="paramInstance" type="ParamInstanceType" />
> <!--
> Specifying a concrete type
> -->
> <xsd:complexType name="ConcreteParamInstance">
> <xsd:complexContent>
> <xsd:extension base="tmp:ParamInstanceType">
> <xsd:attribute name="name" type="xsd:string" use="required" />
> </xsd:extension>
> </xsd:complexContent>
> </xsd:complexType>
> </xsd:schema>
> Test data file:
> ---------------
> <paramInstance xmlns="http://www.temp.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:type="ConcreteParamInstance" name="param1" />
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org