[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

  • From: "Costello, Roger L." <costello@m...>
  • To: <xml-dev@l...>
  • Date: Thu, 15 Nov 2007 09:53:07 -0500

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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.