Hi all.  I'm trying to embed a subset of HTML in my XML documents in 
such a way that it can be validated with XML Schema.  I have the following two 
files (simplified, but still shows the error I'm getting):

Test.xml:
------------------------------------------------------------
<?xml version="1.0"?>
<Test xmlns="Test.xsd">
         <div  xmlns="http://www.w3.org/1999/xhtml";>
         </div>
</Test>
------------------------------------------------------------

Test.xsd:
------------------------------------------------------------
<xsd:schema
         xmlns:xsd="http://www.w3.org/2001/XMLSchema";
         xmlns:jz="Test.xsd"
         xmlns:html="http://www.w3.org/1999/xhtml";
         targetNamespace="Test.xsd"
         elementFormDefault="qualified"
>

<xsd:import namespace="http://www.w3.org/1999/xhtml";
        schemaLocation="http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd"/>

<xsd:element name="Test" type="jz:TTest"/>

<xsd:complexType name="TSection"/>

<xsd:complexType name="TTest">
         <xsd:complexContent>
                 <xsd:extension base="jz:TSection">
                         <xsd:sequence>
                                 <xsd:element ref="html:div"/>
                         </xsd:sequence>
                 </xsd:extension>
         </xsd:complexContent>
</xsd:complexType>

</xsd:schema>
------------------------------------------------------------

        When I run them through xmllint, I get an error that says:
------------------------------------------------------------
Test.xsd:19: element element: Schemas parser error : Element 
'{http://www.w3.org/2001/XMLSchema}element', attribute 'ref': The QName value 
'{http://www.w3.org/1999/xhtml}div' does not resolve to a(n) element 
declaration.
------------------------------------------------------------

        My understanding was that this was supposed to work.  I can see three 
possibilities here:
1.      I've messed up somewhere
2.      libxml2 or xmllint doesn't allow for this
3.      The xhtml11.xsd set of files are messed up somewhere

        I suspect them in that order.  Can anyone confirm which it is (and if 
it's me, pointers to additional relevant information or suggested changes 
would be nice).

        :)


---------------------------------------------------------------------
| Name: Tim Nelson                 | Because the Creator is,        |
| E-mail: [EMAIL PROTECTED] | I am                           |
---------------------------------------------------------------------

----BEGIN GEEK CODE BLOCK----
Version 3.12
GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- 
PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y-
-----END GEEK CODE BLOCK-----
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to