OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   XML Base spec clarification

[ Lists Home | Date Index | Thread Index ]

(I'm moving this thread from the OpenOffice xml list, where I accidentally
posted the original query, d'oh!)

In XML Base [1] it states :

[[
Section 4.1 Relation to RFC 2396
...
2. The base URI is that of the encapsulating entity (message, document, or
none).
]]

Would I be right in thinking that "or none" is a mistake? If not, what on
earth does it mean?

Note that RFC 2396 [2] the corresponding section has :

[[
5.1.2. Base URI from the Encapsulating Entity

   If no base URI is embedded, the base URI of a document is defined by
   the document's retrieval context.  For a document that is enclosed
   within another entity (such as a message or another document), the
   retrieval context is that entity; thus, the default base URI of the
   document is the base URI of the entity in which the document is
   encapsulated.
]]

No mention of "none"-entities.

[1] http://www.w3.org/TR/xmlbase/
[2] http://www.ietf.org/rfc/rfc2396.txt

[Daniel Veillard1]
>   No it's not a mistake. For example a document held in memory or
> passed through an UNIx pipe to the XML parser has no base URI.

[Danny Ayers1]
I don't have a problem with the encapsulating entity having no base URI. But
that isn't what it says.

"2. The base URI is that of the encapsulating entity (message, document, or
none)."

The way I read it either :

the encapsulating entity is a message
or
the encapsulating entity is a document
or
there is no encapsulating entity

[Daniel Veillard2]
  which is also perfectly possible, URL can be printed on paper, on
TV etc ... in which case there is no encapsulating entity I think.

[Danny Ayers2]
That makes sense, but then  "2. The base URI is that of..." doesn't apply.

[Danny Ayers1, cont.]
-> the base URI is that of the message
or
-> the base URI is that of the document
or
-> the base URI is that of nothing

But what is the base URI of nothing?

This isn't the same as :

"The base URI is that of the encapsulating entity (message, document) or
none."

-> the base URI is that of the message
or
-> the base URI is that of the document
or
-> there is no base URI

Which is better, but for either of these interpretations, it isn't clear how
one interprets this subsequent clause in RFC 2396 :

[[
5.1.4
   If none of the conditions described in Sections 5.1.1--5.1.3 apply,
   then the base URI is defined by the context of the application.
]]

Again : "The base URI is that of the encapsulating entity (message,
document, or none)."

Both interpretations above give an solution to finding the base URI (the
base URI is that of the "none" entity or there is no base URI). So how will
5.1.4/4.1.4 ever be reached?

Ok, the only sensible interpretation I can see is that if the encapsulating
entity doesn't have a base URI then the subsequent methods (the retrieval
URI or the application-supplied URI) are used to determine the base URI.

That still isn't perfect, it resolves to say there is no base URI, which
prevents the subsequent methods being tried.

It looks to me like there is a typographical error in the position of the
closing parenthesis which makes it very confusing. I've not checked, is this
meant to be normative? Such a typo wouldn't usually a big deal in written
English, but it really shouldn't happen in a computer language spec.

[Daniel Veillard]
> BTW the base URI for the XML file in the zip container of an OO document
> is unclear. I would assume that it can reference images contained
> in the ZIP using URI-References (like "img.gif" or "images/img.gif")
> but if the XML document itself has no base, then the algorithm from
> RFC 2396 to resolve the relative URI Reference to an URI cannot be
> used stricto sensus. Is there a document specifying the mime-type
> for OO Zip containers and the rules for base and adressing within
> such a zip (what does fragment identifier oo.zip#foo means if there
> is such a meaning).

Won't this be caught by the seemingly wide open "context of the application"
trap?

----

http://dannyayers.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xml.openoffice.org
For additional commands, e-mail: dev-help@xml.openoffice.org





 

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

Copyright 2001 XML.org. This site is hosted by OASIS