[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: A problem with Base URI and nested XIncludes

  • From: "Liam R. E. Quin" <liam@fromoldbooks.org>
  • To: Michael Kay <mike@saxonica.com>, XML Developers List<xml-dev@l...>
  • Date: Wed, 14 Aug 2019 12:58:22 -0400

Re:  A problem with Base URI and nested XIncludes
On Wed, 2019-08-14 at 12:37 +0100, Michael Kay wrote:
> 
> The spec for xml:base says (§4.3) The base URI for a URI reference
> appearing in an xml:base attribute is the base URI of the parent
> element of the element bearing the xml:base attribute, if one exists
> within the document entity or external entity, otherwise the base URI
> of the document entity or external entity containing the element.

The xml:base spec should have been modified to take XInclude into
account, but i don't think any of us thought of it. Instead, the
XInclude spec includes text about base URI fixup - see below.

In general of course, the goal is that the xml:base property of any
element always tells you where that element came from. The underlying
assumption is that the only boundary points at which the base property
changes are the "edges" of expanded file (external parsed) entities and
the outermost document itself, but XInclude breaks that assumption.

What makes most sense to me is to treat your example as,
<!ENTITY c1 SYSTEM "subfolder/child.xml">
<!ENTITY c2 SYSTEM "otherchild.xml">

with subfolder/child.xml looking like:
<child>&c2;</child>

So, the base attrbute is recording for applications the history of how
the document was constructed.

> Would anyone argue that the Xerces output is correct?

Yes, because XInclude includes a section, Base URI Fixup.

See
https://www.w3.org/TR/xinclude/#base
and more recent prose at
https://www.w3.org/TR/xinclude-11/#base
(but the XML Core Working Group was closed before this could become a
Recommendation).

Liam

-- 
Liam Quin, https://www.delightfulcomputing.com/
Available for XML/Document/Information Architecture/XSLT/
XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
Web slave for vintage clipart http://www.fromoldbooks.org/



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.