Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Base URIs

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: John Cowan <jcowan AT reutershealth.com>
  • To: mmceniry AT itsc.uah.edu (Michael McEniry)
  • Cc: elharo AT metalab.unc.edu (Elliotte Rusty Harold), xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Base URIs
  • Date: Wed, 25 Sep 2002 10:40:52 -0400 (EDT)

Michael McEniry scripsit:

> A base URI is scoped to an Element (and Document). The=20
> value of a base URI predominantly used to qualify the=20
> value of a (link) Attribute. Add these methods to=20
> ParentNode, to cover Element and Document, and to=20
> Attribute. It doesn't make sense for the various=20
> LeafNode types to contain these methods.

I agree that setBaseURI belongs in ParentNode only, but
getBaseURI belongs to Node. For example, if you have a
relative URI in a PI, it should be possible to ask
what the base URI is without navigating.

Note that to do this right, it is now necessary to notice
when a new external entity has been entered (you can
hook EntityResolver to do this), since that changes
the base URI. Indeed, one of the purposes of xml:base is
to capture this change when reducing multi-entity documents
to a single entity.

Internal entities do not affect the base, fortunately.

--
John Cowan http://www.ccil.org/~cowan <jcowan AT reutershealth.com>
"Any legal document draws most of its meaning from context. A telegram
that says 'SELL HUNDRED THOUSAND SHARES IBM SHORT' (only 190 bits in
5-bit Baudot code plus appropriate headers) is as good a legal document
as any, even sans digital signature." --me




Archive powered by MHonArc 2.6.24.

Top of Page