You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by "Probert, Christopher" <Ch...@commerceone.com> on 2001/10/23 04:19:31 UTC

xml:lang and xerces 1.4.3

All,

My apologies if this is an oldie, I cannot get into the archives or would
have checked them first. I am trying to declare that an instance conforming
to my schema must have an xml:lang attribute on a certain element. I
followed the instructions given on the w3c site, namely adding:

xmlns:xml="http://www.w3.org/XML/1998/namespace"

to the schema root, and then doing an import:

<xsd:import namespace="http://www.w3.org/XML/1998/namespace"
            schemaLocation="http://www.w3.org/2001/xml.xsd"/>

Then referencing this by using ref="xml:lang" later in the schema.

When testing though, I found that whilst XSV allows this, xerces-j 1.4.3
throws out the following error:

Schema error: prefix : [xml] cannot be resolved to a URI.

and then:

Schema error: no attribute named "lang" was defined in schema : .
Schema error: no attribute named "space" was defined in schema : .

It would appear that it is resolving the url because I do not reference
"space" or "xml:space" anywhere in my own schema.

Is there another way that I could/should be approaching this?

Thanks,

Chris.

Re: xml:lang and xerces 1.4.3

Posted by Elena Litani <el...@ca.ibm.com>.
Hi, Chris,

"Probert, Christopher" wrote:
> 
> PI am trying to declare that an instance conforming
> to my schema must have an xml:lang attribute on a certain element.

There has been a bug reported against Xerces for the same problem.

It has been fixed in CVS. You may want to look at the report to get an
idea on how xml:lang should be used:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3937 


Elena.

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