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

Re: XInclude language fixup

  • From: Dave Pawson <dave.pawson@gmail.com>
  • To: Norm Tovey-Walsh <ndw@nwalsh.com>
  • Date: Sat, 11 Feb 2023 18:28:52 +0000

Re:  XInclude language fixup


On Sat, 11 Feb 2023 at 18:01, Norm Tovey-Walsh <ndw@nwalsh.com> wrote:
Hello world,

Following up on a bug report (only tangentially related), I find myself
reading https://www.w3.org/TR/xinclude-11/#language again and I’m having
trouble working out what’s intended (yes, I know I was the editor for
1.1, but it was a long time ago and it’s remarkable how much
specification prose that is “obvious” when you write it and review it
can lose its obviousness over time).

Is there no inheritance Norm?
From the doc element?

Regards





In particular, I’m trying to work out if/when the value of xml:lang is
the empty string.

Suppose I have:

<doc xmlns:xi="http://www.w3.org/2001/XInclude"
     xml:lang="en">
  <xi:include href="" fragid="element(/1/1)"/>
  <xi:include href="" fragid="element(/1/1)"/>
  <xi:include href="" fragid="element(/1/1)"/>
</doc>

where en.xml is:

  <chap xml:lang="en"><p>English</p></chap>

de.xml is:

  <chap xml:lang="de"><p>Deutsch</p></chap>

and xx.xml is:

  <chap><p>Something</p></chap>

After XInclude processing, if xml:lang fixup is performed, the first two
paragraphs are obvious, I think:

<doc xmlns:xi="http://www.w3.org/2001/XInclude"
     xml:lang="en">
  <p>English</p>
  <p xml:lang="de">Deutsch</p>
  …
</doc>

But what about the third? I can’t decide if 4.7.6 says it should be

  <p xml:lang="">Something</p>

or if 4.7.6. only admits the possibility that I might have specified
<chap xml:lang="sp"><p xml:lang="">Something</p></chap> to reset
the paragraph to, I guess, the “default” value.

My XInclude processor currently produces

<doc xmlns:xi="http://www.w3.org/2001/XInclude"
     xml:lang="en">
  <p xml:lang="en">English</p>
  <p xml:lang="de">Deutsch</p>
  <p>Something</p>
</doc>

I’m not too worried about the redundant xml:lang on first paragraph, it
seems harmless. But should I put xml:lang="" on the last paragraph?

I think the answer is “yes” but I wonder if anyone else feels strongly
that I’m wrong.

FWIW, I’m also confused about the last paragraph in that section:

  If an xml:lang attribute information item is already present, it is
  replaced by the new attribute.

How is that ever going to happen? I think that’s just…incoherent.

                                        Be seeing you,
                                          norm

--
Norman Tovey-Walsh <ndw@nwalsh.com>
https://nwalsh.com/

> Change is a dangerous game, but one you have to play.
--
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.


[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.