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 Ashish Krishna <as...@scmail.ectone.com> on 2001/01/23 03:51:10 UTC

how to handle xml:lang attribute

Hi all,

I have a question regarding xml:lang attribute.

I am trying to parse and validate an xml document that contains the
attribute xml:lang

the error I get is as follows:
**************************************
sample_xml.xml:
[Error] sample_xml.xml:7:32: Attribute "xml:lang" must be declared for
element type "FreeFormText".
<?xml version="1.0" encoding="UTF-8"?>
<DOCROOT xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="sample_xsd.xsd">

<Element1>First Element</Element1>
<FreeFormText xml:lang="en-US">Some Text</FreeFormText>
</DOCROOT>
***************************************

I am using DOMWriter that came with xerces1.2.1 and I have -n and -v flags
enabled.

Thanks
--Ashish