[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 2 questions about Relax NG: ID/IDREF datatype and whitespace facet
Hi Folks, I am reading the "Guidelines for using W3C XML Schema Datatypes with RELAX NG"[1], and am confused about a couple of things. QUESTION #1 This paragraph in the Guidelines discusses the ID, IDREF datatypes: The semantics defined by [W3C XML Schema Datatypes] for the ID, IDREF and IDREFS datatypes are purely lexical and do not include the cross-reference semantics of the corresponding [XML 1.0] datatypes. The cross-reference semantics of these datatypes in XML Schema comes from XML Schema Part 1. Furthermore, the [XML 1.0] cross-reference semantics of these datatypes do not fit into the RELAX NG model of what a datatype is. Therefore, RELAX NG validation will only validate the lexical aspects of these datatypes as defined in [W3C XML Schema Datatypes]. I am unclear on what the paragraph is saying. Consider this example: <BookStore> <Books> <Book id="PM"> ... </Book> <Book id="RB"> ... </Book> </Books> <GuestAuthor> <BookSigning idref="PM"/> </GuestAuthor> </BookStore> I interpret the above paragraph to mean: - a Relax NG validator will check that "PM" and "RB" are valid ID values, and will check the "PM" is a valid IDREF value, - but it will not check that the idref value matches one of the id values. However, when I actually run the example using the Jing validator, I get an error if the idref value does NOT match an ID value. Thus, this generates an error: <BookSigning idref="blah"/> Jing seems to be doing cross-referencing checks, which seems to be counter to what the paragraph specifies. Am I misreading the paragraph, or is the Jing validator in error? QUESTION #2 This paragraph in the Guidelines discusses the whitespace facet: Any facet can be specified as a parameter with the following exceptions * whiteSpace (the builtin derived datatype that specifies the desired value for the whiteSpace facet should be used instead) I am unclear about this paragraph as well. I interpret it to say that a Relax NG schema may not use the whitespace facet. But I do not understand the other part in parenthesis - how is whitespace specified? /Roger [1] http://relaxng.org/xsd-20010907.html [Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|