473,949 Members | 8,623 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
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 1836

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

Similar topics

1
3141
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" xmlns:myns="http://www.mydomain.com/myschema" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" elementFormDefault="qualified">
0
2176
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 them. eventiually i want to generate the xslt from a xml file (all the files and java code are at http://tayek.com/~ray/spy1/). the java code (1.4) does the right thing (it just does the transformation). xmlspy seems really broken when i hit...
2
6934
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
2242
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. Thanks, Neil
2
2034
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...' like
3
9944
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"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="myns" xmlns="myns" elementFormDefault="qualified"> <xs:element name="books"> <xs:complexType> <xs:sequence>
2
2952
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 20616") doesn't seem to know anything about idref, key or keyref. Specifically, the use of 'xsd:key' and 'xsd:keyref' in the schema causes xmllint to output Unimplemented block at xmlschemas.c:5588 and the use of 'idref' (but not of 'id')...
2
2025
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 type, or, in other words, to those element with a specific tag name. For instance: <xs:element name="A"> <xs:complexType> <xs:attribute name="id" type="xs:ID"/>
4
2501
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 elements contain all the info for the groups // name is of type ID <group name="group1" … /> <group name="group2" … />
0
10170
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9989
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11185
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10697
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9902
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7435
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4952
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4545
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3552
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.