XMLSpy: why is IDREF undefined?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lars

    #1

    XMLSpy: why is IDREF undefined?

    Hi all,
    I suspect this may be a bug in XMLSpy, since IE seems to validate this
    XML successfully. Maybe someone here has run into this and can tell
    me.

    Problem: When I try to validate the XML document hans-cc.xml in
    XMLSpy, it gives me the error
    Undefined ID 'comp-cl' referred to from attribute 'styleID'

    I have an XML file hans-cc.xml which uses entity references to include
    a file called aesthconf3.xml. Here's the beginning of hans-cc.xml:

    <?xml version="1.0" encoding="utf-8"?>
    <?xml-stylesheet type="text/xsl" href="cc-to-html.xsl"?>
    <!DOCTYPE cc SYSTEM "cc.dtd" [
    <!ENTITY ancf SYSTEM "hans-ancf.xml">
    <!ENTITY aecf SYSTEM "aesthconf3.xml ">
    ]>
    <cc xmlns="http://www.gial.edu/huttar/cc/">
    <metadata dtd-version="2003-06-13T14:17:05-0500"
    source-document='Hwang , Shin Ja J. 1997. Chart of "Little Hans".
    Unpublished ms.' source-version="1997"
    document-version="2003-06-13T14:17:05-0500">
    <title>Constitu ent chart: "Little Hans"</title>
    <attribution>fr om Hwang, Shin Ja J. 1997. Chart of "Little Hans".
    Unpublished ms. Used by permission.</attribution>
    </metadata>
    &ancf;
    &aecf;
    <body>

    When XMLSpy gives me the aforementioned error, it highlights the two
    entity references shown above. (I know the entity references per se
    are not broken, as they've been there for a while and have not caused
    problems.)

    Here's part of the file aesthconf3.xml, including both the definition
    of the 'comp-cl' ID, and an IDREF referring to it (see comments):

    <?xml version="1.0" encoding="UTF-8"?>
    <aesthetic-config>
    <column-styles>
    <column-style rank="2" border-style="double"/>
    </column-styles>
    <row-styles>
    ....
    </row-styles>
    <stretch-styles>
    <stretch-style styleID="move-dest" />
    <stretch-style styleID="note" />
    <stretch-style styleID="comp-cl" /> <!-- this attr is of type ID
    -->
    <stretch-style styleID="rel-cl" />
    <stretch-style styleID="direct-quote" />
    <stretch-style styleID="italic " />
    </stretch-styles>
    <legend>
    ....
    <legend-sample description="co mplement clause">
    <wordStretch unitGroup="u3" styleID="compl-cl"> <!-- type IDREF
    -->
    <word>
    <vernac>text</vernac>
    </word>
    </wordStretch>
    </legend-sample>

    Here's a bit of cc-aesthconf.dtd (included by cc.dtd) which defines
    stretch-style's styleID attribute as being of type ID:

    <!-- cc:stretch-style - a container for a styleID attribute of type
    ID, for IDREFs to refer to -->
    <!ELEMENT stretch-style EMPTY>
    <!ATTLIST stretch-style styleID ID #REQUIRED>

    So... anybody see what I'm doing wrong? It seems to me I'm defining an
    ID with value 'comp-cl', yet XMLSpy tells me 'comp-cl' is an undefined
    ID.

    Obviously I haven't given all the files... that might be a bit much
    for the newsgroup, but I've put them at

    in case they need to be seen in entirety.

    Thanks for any help!

    By the way, I would also be happy to learn how to ask Saxon 6.5.2 (or
    rather ask Crimson, via Saxon command-line) to validate my XML as it's
    reading it in. Currently that doesn't seem to be happening. I would
    like to see whether Crimson agrees with XMLSpy that my XML is invalid.

    Regards,
    Lars
Working...