XMLSpy: why is IDREF undefined?

L

Lars

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>Constituent chart: "Little Hans"</title>
<attribution>from 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="complement 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
http://occs.cs.oberlin.edu/~huttar/xmlproto/tmp.html
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top