W3C home > Mailing lists > Public > www-xml-linking-comments@w3.org > July to September 2000

Validation of documents using internal XLinks [Was:] Dependency of XPointers upon DTD

From: Eric van der Vlist <vdv@dyomedea.com>
Date: Fri, 08 Sep 2000 09:25:59 +0200
Message-ID: <39B89487.DBAA0359@dyomedea.com>
To: "Eve L. Maler" <eve.maler@east.sun.com>
CC: www-xml-linking-comments@w3.org
Hi again,

"Eve L. Maler" wrote:
> At 04:00 PM 9/1/00 +0200, Eric van der Vlist wrote:
> >I'd like to point out the level of dependency of the current XPointers
> >CR on DTDs which IMHO should be neutral to the schema system used.
> >My understanding is that the "bare names" scheme [1] relies on the XPath
> >unique IDs [2] which themselves relies on DTD's ID typed attributes.
> >
> >This scheme, being the easiest to write and more robust scheme will
> >probably be widely used and I wonder if it's not dangerous to rely on
> >DTDs which present well know limitations especially with the namespaces
> >which usage is mandatory with XLink.
> DTDs are not being relied on; there are always other means to point to a
> particular element if you wish, and you don't need to default your
> attribute values.  And an internal subset could be used in a published
> document to "mark" an attribute as being of type ID even if the document is
> only well-formed; an XPointer into a document without such a "marker"
> wouldn't want to rely on the fact that the attribute is typed.

Isn't it quite dangerous then ?
If we open the game to user defined way if "marking" the IDs, we will
end up by unpredictable results depending on the application used to
process the document...
> I agree that the namespace aspect is somewhat problematic (what if the
> attribute is "global" and has a namespace prefix on it? what about the
> element it's on?).  However, the problem here would be one of
> adding/maintaining the "markers" in the target document, not changing an
> XPointer into that document (if the XPointer is written correctly).
> When XML Schema is stable and standardized, a later version of XPointer
> (and, I assume, the XPath spec on which it is based) could take advantage
> of schemas and the post-schema-validation infoset to detect which elements
> have which IDs.

My point was just to try to avoid this ;=) !

The XML Schemas WG can have the same attitude and just say "let's wait
until XPointers is a rec before supporting them" and we'll end up with
XPointers not being able to rely on schemas and schemas not being able
to validate XPointers [1].


I am working on a comparison of different techniques which can be used
to implement links between nodes within a document and I have been
disappointed to see that:

1) the move between a user defined "physical" link using ID and IDREF
(DTD or schemas) to a simple XLink is implying that a full validation
(including the check that the IDREF is matching an existing ID) was no
longer possible with DTD nor with schemas.

Concretely, replacing "ref='IDREF'" by "xlink:href='#IDREF'" is more
intrusive that I would have thought !

2) the move between user defined "logical" link to its equivalent using
a full XPointer scheme is even more intrusive since that you don't only
lose the ability to validate it, but also the ability to process it
through XSLT.

What I mean by logical link is a link matching an attribute which is not
declared as ID, such as a name.

If the user defined logical link is <author ref_name="xxx"/>, the
corresponding xlink would be something like <author
xlink:href="#xpointer(//author[name='xxx']"/> .

While you can validate (using XML Schemas) and resolve the link using
XSLT the user defined link, you can't validate the XLink alternative (at
least using XML Schemas as defined today) and, since XSLT doesn't
support variable XPath expressions, you can't even resolve the link
using a standard XSLT processor.

By comparison, RDF which is often considered as an intrusive technology
does not present these 2 downsides and you can both validate (through
XML Schemas) and resolve using XSLT the same links expressed as RDF

> >This scheme relies on a unique ID mechanism which is also implemented in
> >XML Schemas [3].
> >
> >Is it possible to add amongst the XPointers extensions to XPath that a
> >XML Schemas ID should play the same role ?
> Until XML Schema is a Recommendation, as I mentioned above, I think it
> would be complicated to add features that rely on it.

I try to follow carefuly the work of the W3C which is unique in the
history by the amount of recommendations produced, the very modular
approach and the speed with which they are produced.

I am very impressed and I don't think anyone would have done better.

Nevertheless, while I see your point as a recommendation editor, as a
user of W3C recommendations, I would like to be able to use all of them
together ;=) !


>          Eve
> --
> Eve Maler                                          +1 781 442 3190
> Sun Microsystems XML Technology Center    eve.maler @ east.sun.com

Eric van der Vlist       Dyomedea                    http://dyomedea.com
http://xmlfr.org         http://4xt.org              http://ducotede.com
Received on Friday, 8 September 2000 03:25:00 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:32:22 UTC