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: laurent.bihanic AT atosorigin.com (Laurent Bihanic)
  • 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 11:54:29 -0400 (EDT)

Laurent Bihanic scripsit:

> What do you think getBaseURI() should return? If called on any node but
> Element and Document, it can only return the parent's base URI.

+1

> On Element and
> Document shall it try to resolve absent or relative URIs using the parent's
> base URI? If yes, how does an application retrieve the actual base URI it
> has
> just set?

No. Java already knows how to resolve the pair {base URI, relative URL};
there is no reason to duplicate that.

> Relative URIs, as these are allowed by the XML Base spec.

Actually, it doesn't. The value of an xml:base attribute can be a relative
URL, but the value of the base URI that it is specifying cannot.

> In addition, base URIs shall be
> stored as specified in the input document or by the application and the
> resolution into absolute URIs shall only occur upon request and depend on
> the
> parent base URI.

-1

> Only the xml:base attributes defined by the application should be
> outputted,
> the structure of the document defining their scope, as for namespaces.

Since XOM discards entity-boundary information, serializing must insert
xml:base attributes at entity boundaries for reliability.
External entities that contain less than an element (just PIs or PCDATA
or references to other entities) don't count for this purpose.

--
"No, John. I want formats that are actually John Cowan
useful, rather than over-featured megaliths that http://www.ccil.org/~cowan
address all questions by piling on ridiculous
http://www.reutershealth.com
internal links in forms which are hideously jcowan AT reutershealth.com
over-complex." --Simon St. Laurent on xml-dev




Archive powered by MHonArc 2.6.24.

Top of Page