Re: IDERF headaches

On Friday 19 July 2002 04:04 pm, Hallam-Baker, Phillip wrote:
>     Turns out that our use of IDREF is not quite kosher.
>     An IDREF has to reference an ID in the *same* document.
>     So I have changed the offending IDREFs to string

I'm not sure what you are referring to, but if an attribute value is making 
a reference to an external document the correct type is "anyURI" [1]. I've 
never found a need for an IDREF in a schema. (The difference between an 
IDREF and an anyURI that point to a local ID is that the anyURI will start 
with the fragment identifier '#'.)

As an aside, in terms of debugging schema I learned that you can't be 
confident until you've created an instance that excercises as much as the 
schema as possible and then run it through a validator (i.e., xv or msv). 
Sun also provides "xmlgen" that will create instances based on a schema 
which you can then use as a sanity check to look at, or run through someone 
else's validator!

http://www.w3.org/TR/xmlschema-2/#anyURI

Received on Friday, 19 July 2002 16:41:17 UTC