[osis-core] xml:lang namespace problem

Patrick Durusau osis-core@bibletechnologieswg.org
Sun, 08 Jun 2003 17:21:04 -0400


This is a multi-part message in MIME format.
--------------030301070007080601040000
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Todd,

The answer to your xml:lang question. I will either incorporate it in 
tonight's release or another alpha in the morning.

Patrick


http://lists.xml.org/archives/xml-dev/200111/msg00983.html

-- 
Patrick Durusau
Director of Research and Development
Society of Biblical Literature
Patrick.Durusau@sbl-site.org
Co-Editor, ISO 13250, Topic Maps -- Reference Model

Topic Maps: Human, not artificial, intelligence at work!



--------------030301070007080601040000
Content-Type: text/html;
 name="lists.xml.org/archives/xml-dev/200111/msg00983.html"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="lists.xml.org/archives/xml-dev/200111/msg00983.html"
Content-Base: "http://lists.xml.org/archives/xml-dev/
	200111/msg00983.html"
Content-Location: "http://lists.xml.org/archives/xml-dev/
	200111/msg00983.html"

<!-- MHonArc v2.5.0b2 -->
<!--X-Subject: xml:lang namespace problem -->
<!--X-From-R13: "Ib Qunat" <jpunatNavfg.tbi> -->
<!--X-Date: 29 Nov 2001 16:47:24 &#45;0000 -->
<!--X-Message-Id: 029701c178f5$281ffc30$4c3d0681@videolab1 -->
<!--X-Content-Type: text/plain -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML//EN">
<html>
<head>
<title>xml:lang namespace problem</title>
<link rev="made" href="mailto:wchang@nist.gov">
</head>
<body>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->
<hr>
[<a href="msg00982.html">Date Prev</a>][<a href="msg00984.html">Date Next</a>][<a href="msg00982.html">Thread Prev</a>][<a href="msg00984.html">Thread Next</a>][<a href="maillist.html#00983">Date Index</a>][<a href="threads.html#00983">Thread Index</a>]
<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<h1>xml:lang namespace problem</h1>
<hr>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<ul>
<li><em>To</em>: &lt;<A HREF="mailto:xml-dev@lists.xml.org">xml-dev@lists.xml.org</A>&gt;</li>
<li><em>Subject</em>: xml:lang namespace problem</li>
<li><em>From</em>: &quot;Wo Chang&quot; &lt;<A HREF="mailto:wchang@nist.gov">wchang@nist.gov</A>&gt;</li>
<li><em>Date</em>: Thu, 29 Nov 2001 11:44:46 -0500</li>
<li><em>Reply-to</em>: &quot;Wo Chang&quot; &lt;<A HREF="mailto:wchang@nist.gov">wchang@nist.gov</A>&gt;</li>
</ul>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<hr>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<pre>
Please help!

I'm trying to use Xerces-J CVS (2.0 beta 3 beyond) version to
validate the xml:lang namespace, but got the following error:

[Error] test.xml:38:25: cvc-complex-type.3.2.2: Attrib
ute 'xml:lang' is not valid respect to the attribute wildcard of
Elment 'FreeText'.

Is my example incorrect or is something else?  Can anyone help?
I'm enclosing the .xsd and .xml at the bottom.

Thanks!

--Wo

--------------- test.xsd ---------------
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;schema targetNamespace=&quot;urn:mpeg:mpeg7:schema:2001&quot;
   xmlns=&quot;<A  HREF="http://www.w3.org/2001/XMLSchema&quot">http://www.w3.org/2001/XMLSchema&quot</A>;
   xmlns:xml=&quot;<A  HREF="http://www.w3.org/XML/1998/namespace&quot">http://www.w3.org/XML/1998/namespace&quot</A>;
   xmlns:mpeg7=&quot;urn:mpeg:mpeg7:schema:2001&quot;
     elementFormDefault=&quot;qualified&quot; attributeFormDefault=&quot;unqualified&quot;&gt;

&lt;import namespace=&quot;<A  HREF="http://www.w3.org/XML/1998/namespace&quot">http://www.w3.org/XML/1998/namespace&quot</A>;
            schemaLocation=&quot;xml-1998.xsd&quot;/&gt;

&lt;element name=&quot;Root&quot;&gt;
&lt;complexType&gt;
&lt;sequence&gt;
&lt;element name=&quot;FreeText&quot;
type=&quot;mpeg7:TextualType&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;/&gt;
&lt;/sequence&gt;
&lt;/complexType&gt;
&lt;/element&gt;

&lt;complexType name=&quot;TextualBaseType&quot; abstract=&quot;true&quot;&gt;
&lt;simpleContent&gt;
&lt;extension base=&quot;string&quot;&gt;
&lt;attribute ref=&quot;xml:lang&quot; use=&quot;optional&quot;/&gt;
&lt;!-- omitted for simplicity
&lt;attribute name=&quot;phoneticTranscription&quot;
use=&quot;optional&quot;&gt;
&lt;simpleType&gt;
&lt;list
itemType=&quot;mpeg7:PhoneType&quot;/&gt;
&lt;/simpleType&gt;
&lt;/attribute&gt;
&lt;attribute name=&quot;phoneticAlphabet&quot;
type=&quot;mpeg7:phoneticAlphabetType&quot; use=&quot;optional&quot; default=&quot;sampa&quot;/&gt;
--&gt;
&lt;/extension&gt;
&lt;/simpleContent&gt;
&lt;/complexType&gt;
&lt;!-- Definition of Textual datatype --&gt;
&lt;complexType name=&quot;TextualType&quot;&gt;
&lt;simpleContent&gt;
&lt;extension base=&quot;mpeg7:TextualBaseType&quot;/&gt;
&lt;/simpleContent&gt;
&lt;/complexType&gt;
&lt;/schema&gt;

------------ xml-1998.xsd -----------
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;schema targetNamespace=&quot;<A  HREF="http://www.w3.org/XML/1998/namespace&quot">http://www.w3.org/XML/1998/namespace&quot</A>;
xmlns=&quot;<A  HREF="http://www.w3.org/2001/XMLSchema&quot">http://www.w3.org/2001/XMLSchema&quot</A>;
xmlns:x=&quot;<A  HREF="http://www.w3.org/XML/1998/namespace&quot">http://www.w3.org/XML/1998/namespace&quot</A>;&gt;
&lt;annotation&gt;
&lt;documentation&gt;This schema defines attributes and an attribute
group
        suitable for use by
        schemas wishing to allow xml:lang or xml:space attributes
        on elements they define.

        To enable this, such a schema must first declare the XML
        namespace, and then import this schema
        for the XML namespace, e.g. as follows:
        &amp;lt;schema . . . xmlns:xml=&quot;<A  HREF="http://www.w3.org/XML/1998/namespace&quot">http://www.w3.org/XML/1998/namespace&quot</A>;&gt;
         . . .
         &amp;lt;import namespace=&quot;<A  HREF="http://www.w3.org/XML/1998/namespace&quot">http://www.w3.org/XML/1998/namespace&quot</A>;
                    schemaLocation=&quot;<A  HREF="http://www.w3.org/XML/2000/10/xml.xsd&quot;/">http://www.w3.org/XML/2000/10/xml.xsd&quot;/</A>&gt;

        Subsequently, qualified reference to either of the attributes
        or the group defined below will have the desired effect, e.g.

        &amp;lt;type . . .&gt;
         . . .
         &amp;lt;attributeGroup ref=&quot;xml:specialAttrs&quot;/&gt;

         will define a type which will schema-validate a instance
         element with both xml:space and xml:lang attribute&lt;/documentation&gt;
&lt;/annotation&gt;
&lt;attribute name=&quot;lang&quot; type=&quot;language&quot;&gt;
&lt;annotation&gt;
&lt;documentation&gt;In due course, we should install the
relevant ISO 2- and 3-letter
         codes as the enumerated possible values . . .&lt;/documentation&gt;
&lt;/annotation&gt;
&lt;/attribute&gt;
&lt;attribute name=&quot;space&quot; default=&quot;preserve&quot;&gt;
&lt;simpleType&gt;
&lt;restriction base=&quot;NCName&quot;&gt;
&lt;enumeration value=&quot;default&quot;/&gt;
&lt;enumeration value=&quot;preserve&quot;/&gt;
&lt;/restriction&gt;
&lt;/simpleType&gt;
&lt;/attribute&gt;
&lt;attributeGroup name=&quot;specialAttrs&quot;&gt;
&lt;attribute ref=&quot;x:lang&quot;/&gt;
&lt;attribute ref=&quot;x:space&quot;/&gt;
&lt;/attributeGroup&gt;
&lt;/schema&gt;

------------ test.xml ---------------
&lt;?xml version=&quot;1.0&quot; encoding=&quot;iso-8859-1&quot;?&gt;
&lt;Root xmlns=&quot;urn:mpeg:mpeg7:schema:2001&quot;
      xmlns:mpeg7=&quot;urn:mpeg:mpeg7:schema:2001&quot;
      xmlns:xml=&quot;<A  HREF="http://www.w3.org/XML/1998/namespace&quot">http://www.w3.org/XML/1998/namespace&quot</A>;
      xmlns:xsi=&quot;<A  HREF="http://www.w3.org/2001/XMLSchema-instance&quot">http://www.w3.org/2001/XMLSchema-instance&quot</A>;
      xsi:schemaLocation=&quot;urn:mpeg:mpeg7:schema:2001 test.xsd&quot;&gt;
&lt;FreeText xml:lang=&quot;us&quot;&gt;Hello world!!&lt;/FreeText&gt;
&lt;FreeText xml:lang=&quot;jp&quot;&gt;Sekai yo Kon-nichiwa!!&lt;/FreeText&gt;
&lt;/Root&gt;

</pre>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00984" href="msg00984.html">Re: [xml-dev] xml:lang namespace problem</a></strong>
<ul><li><em>From:</em> Richard Tobin &lt;richard@cogsci.ed.ac.uk&gt;</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00982.html">Re: [xml-dev] trouble with 'all' in schema :(</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00984.html">Re: [xml-dev] xml:lang namespace problem</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00982.html">Re: [xml-dev] trouble with 'all' in schema :(</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00984.html">Re: [xml-dev] xml:lang namespace problem</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00983"><strong>Date</strong></a></li>
<li><a href="threads.html#00983"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>

--------------030301070007080601040000--