XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
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]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS