473,387 Members | 1,431 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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>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
Jul 20 '05 #1
0 1809

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: kk | last post by:
I can't figure out why XMLSpy can't validate pass the following schema segment: <?xml version="1.0" encoding="UTF-8"?> <xs:schema targetNamespace="http://www.mydomain.com/myschema"...
0
by: Ray Tayek | last post by:
hi, trying to convert some csv files into xsml and pulling a few hairs out :(. using the files below. a java program will parse the csv and take care of strange names and notes that line breaks in...
2
by: Nicolas Bouillon | last post by:
Hi I am writing a schema and i want to have an element's attribute, which is an IDREF to an other type of element. For example <Type1 id="id1"/> <Type2 id="id2"/>
2
by: Neil Zanella | last post by:
Hello, Is it possible to specify an IDREF to an element to an external file in a DTD? I really need this feature cause that way I can do a good job of validating the XML files I am using. ...
2
by: jacquesh | last post by:
HI all I'm looking for different ways to using idref with more than one XML file ?? My case :: 2 xml files {labo.xml, contact.xml} I found a method which use an include via '<!ENTITY...'...
3
by: Eric Lilja | last post by:
Sorry for asking so many questions, but I've just started and need to get some things working so I can do the task that is before me. Consider this (validating) schema: <?xml version="1.0"?>...
2
by: maxwell | last post by:
I'm trying to write a schema, and test it by running an xml file of test data based on that schema through xmllint. I'm having a problem, because xmllint ( --version reports "using libxml version...
2
by: Luigi | last post by:
Hello! I'm writing a schema where an element has got a reference to another element via IDREF. The problem is that I would restrict the possible references to the sole elements of a specific...
4
Dormilich
by: Dormilich | last post by:
Hello, I'm back with a problem, where I need help with starting. I got an XML file that contains a number of elements with IDREF type attributes: <?xml version="1.0" ?> <root> // these...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.