Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: include file problem: namespaces? >Thread Next - Re: include file problem: namespaces? Re: include file problem: namespaces?To: NULL Date: 5/4/2006 7:55:00 PM
OK, I trimmed it down. Unfortunately, I'm posting on Google groups, so
I can't attach files (maybe that's a no-no here anyway?). So, here
goes:
First, the schema, which I have in a file BugSchema.xsd:
---------------BugSchema.xsd-----------------
<?xml version="1.0"?>
<xsd:schema xmlns:xsd ="http://www.w3.org/2001/XMLSchema"
targetNamespace
="http://lodl.ldc.upenn.edu/ParadigmDefn.xsd"
xmlns
="http://lodl.ldc.upenn.edu/ParadigmDefn.xsd"
elementFormDefault ="qualified"
>
<xsd:element name="ParadigmDefns">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="Paradigm" minOccurs="1"
maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Paradigm">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="FeatureValueSet" minOccurs="1"
maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="FeatureValueSet">
</xsd:element>
</xsd:schema>
-----------------------------------------------------------
Next, the file to be validated against that schema, Bug.Defn.xml:
------------------Bug.Defn.xml--------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE ParadigmDefn
[<!ENTITY Inclusion SYSTEM "IncludeBug.xml">]
>
<ParadigmDefns xmlns
="http://lodl.ldc.upenn.edu/ParadigmDefn.xsd"
xmlns:xsi
="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://lodl.ldc.upenn.edu
ParadigmDefn.xsd"
>
<Paradigm>
<!--If the ff. '&Inclusion;' is commented out, this file
validates.-->
&Inclusion;
<FeatureValueSet></FeatureValueSet>
</Paradigm>
</ParadigmDefns>
-----------------------------------------
And finally, the "include" file, IncludeBug.xml:
--------------------IncludeBug.xml---------------
<FeatureValueSet></FeatureValueSet>
-----------------------------------------
You'll notice that this line is identical to the line that appears
immediately below the '&Inclusion;'; the latter line does not cause any
problem, if the '&Inclusion;' is commented out.
The error msg happens (if the inclusion is not commented out) when I
run the ff. cmd:
xmllint --noout --noent --schema BugSchema.xsd TestSuite/bug.Defn.xml
Specifically, the error msg is:
Element 'FeatureValueSet': This element is not expected. Expected is
( {http://lodl.ldc.upenn.edu/ParadigmDefn.xsd}FeatureValueSet ).
TestSuite/bug.Defn.xml fails to validate
I'm running this under CygWin. xmllint reports "using libxml version
20622 of the in-memory document" (whatever that means--sounds like an
odd version #, but...)
Thanks for any suggestions!
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
