XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] 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]


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

Copyright 1993-2007 XML.org. This site is hosted by OASIS