Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: include file problem: namespaces?

From: maxwell@---.-----.---
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!



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent