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 12/02/2023 10:11, Norm Tovey-Walsh wrote:
...
I have now convinced myself that the correct result is:

   <doc xmlns:xi="http://www.w3.org/2001/XInclude";
        xml:lang="en">
     <p xml:lang="">Something</p></chap> [sic]
   </doc>
That's where I'd got to.

There's also your:

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

That's the hardest part to work out.  My most plausible scenario is that
an 'xml:lang' can be replaced by its normalized (in the XML attribute
sense [1], not the "i-klingon" to "tlh" RFC 4646 sense [2]) value.

E.g.:

xml:lang="
en"

could be normalised to 'xml:lang=" en"' or 'xml:lang="en"', depending on
whether there's a schema and what it says about 'xml:lang'. [3]  But
surely that would happen anyway, and the XInclude processor would never
see the line-break in the 'xml:lang' value?

Is it that the XInclude processing can rewrite the 'attribute type' of
the 'xml:lang' to always be CDATA?

Given that the input infoset does not have to provide 'attribute type', [5]
it might be a replacement if the XInclude processing creates 'attribute
type'?

But I'm groping in the dark.  What other scenarios are there?

Section 4.7.6 [4] includes:

   Each element information item in the top-level included items which
   has a different value of language than its include parent ... has an
   attribute information item added to its attributes property.

This doesn't say anything about removing attributes, so if 'xx.xml' is:

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

the result would be:

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

It hardly matters, but is that correct?

Regards,


Tony Graham.
--
Senior Architect
XML Division
Antenna House, Inc.
----
Skerries, Ireland
tgraham@antenna.co.jp


[1] https://www.w3.org/TR/REC-xml/#AVNormalize
[2] https://www.rfc-editor.org/rfc/rfc4646#section-4.4
[3] https://www.w3.org/TR/REC-xml/#sec-lang-tag
[4] https://www.w3.org/TR/xinclude-11/#language
[5] https://www.w3.org/TR/xinclude-11/#infoset


[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