W3C home > Mailing lists > Public > xmlschema-dev@w3.org > November 2003

Re: anybody use dynamic property of xercesJ 2(typo)

From: Dean Hiller <dhiller@avaya.com>
Date: Tue, 18 Nov 2003 12:35:36 -0700
Message-ID: <3FBA7488.50307@avaya.com>
To: Dean Hiller <dhiller@avaya.com>
Cc: xmlschema-dev@w3.org

whoops the error was
ERROR: cvc-elt.4.2:  Cannot resolve 'ava:ExtendedElement' to a type 
definition for element 'Element'.

Dean Hiller wrote:

> Hi all,
>    I don't really feel like joining yet another e-mail list for one 
> question, so I thought I would ask here and see if anybody knows 
> first. I am getting the following error from xercesJ 2.
> ERROR: cvc-elt.4.2:  Cannot resolve 'ava:ExtendedElement' to a type 
> definition for element 'extensions'.
> I have the following xml
> <Root xmlns:xsi="http://..../XMLSchema-instance"
>                xsi:schemaLocation="http://originalschema schema.xsd"
>                xmlns="http://originalschema"
>                xmlns:ava="http://www.avaya.com">
> <Element xsi:type="ava:ExtendedElement">
>    <data1>some data</:data1>
>    <ava:data2>more data</ava:data2>
> </Element>
> </Root>
> Notice, the ExtendedElement is in a different namespace.  I set the 
> xerces parser to do dynamic validation and give it the location of the 
> one schema I want to validate against.....
> parser.setFeature("http://xml.org/sax/features/validation", true);
> parser.setFeature("http://apache.org/xml/features/validation/schema", 
> true);
> parser.setFeature("http://apache.org/xml/features/validation/dynamic", 
> true);
> parser.setProperty("http://apache.org/xml/properties/schema/external-schemaLocation", 
>                "http://originalschema original.xsd");
> Notice, I do not set the location of the avaya schema.  I don't want 
> it, and only want to make sure stuff is valid against the 
> originalschema(to maintain compatibility).  I ignore anything not from 
> the originalschema namespace to maintain compatibility with other 
> companies too that adhere to the standard...ie I use no proprietary 
> features, only ones in the standard.
> Why am I getting the error then?  I thought it was xerces was only 
> supposed to validate against a schema it had when the dynamic feature 
> was set?  It doesn't have the avaya schema, so shouldn't it just skip 
> it and only validate Element and the nested data inside Element since 
> they are part of the original namespace.
> thanks for any help on this,
> Dean
Received on Tuesday, 18 November 2003 14:35:39 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:03 UTC