You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by polymorphisme <we...@polymorphisme.org> on 2012/10/09 20:22:54 UTC
XInclude and xml:lang
My question is very simple.
I have a main file :
<foo xml:lang="fr" xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="file.xml"/>
</foo>
and the file.xml : <bar/>
When I do a test with the exemple sax.Writer, I obtain the attribut
xml:lang="" !
Why I can't obtain xml:lang="fr" ou nothing since I have foo xml:lang="fr" ?
sax.Writer -xi src/resources/xerces/xerces-xi.xml
<foo xml:lang="fr" xmlns:xi="http://www.w3.org/2001/XInclude">
<bar xml:base="file.xml" xml:lang=""/>
</foo>
Regard.
--
View this message in context: http://old.nabble.com/XInclude-and-xml%3Alang-tp34533941p34533941.html
Sent from the Xerces - J - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org
RE: XInclude and xml:lang
Posted by David Lee <dl...@calldei.com>.
I think you are confusing the effect of xml:base and xml:lang with actual instances of the attribute.
The attributes xml:base and xml:lang do not get magically reproduced on all children,
thus your xpath is correctly not finding xml:lang on child elements where it was not explicitly added.
See:
http://www.w3.org/TR/xml11/
Section 2.12
"A special attribute named xml:lang may be inserted in documents to specify the language used in the contents and attribute values of any element in an XML document."
Like xml:base this puts the burden on the processor to implement the inheritance of the *property* specified by xml:lang ... but does not physically add new attributes in the XML.
----------------------------------------
David A. Lee
dlee@calldei.com
http://www.xmlsh.org
-----Original Message-----
From: polymorphisme [mailto:webmaster@polymorphisme.org]
Sent: Wednesday, October 10, 2012 9:40 AM
To: j-users@xerces.apache.org
Subject: RE: XInclude and xml:lang
I have not understand why I obtain <bar xml:base="file.xml" xml:lang=""/>,
like this :
<foo xml:lang="fr" xmlns:xi="http://www.w3.org/2001/XInclude">
<bar xml:base="file.xml" xml:lang=""/>
</foo>
It's no very logic.
For example, with XPath, //bar/xml:lang return something like this : "";
so what in fact, the langage's bar is "fr".
Why I haven't or can't obtain something like this :
<foo xml:lang="fr" xmlns:xi="http://www.w3.org/2001/XInclude">
<bar xml:base="file.xml"/>
</foo>
or this :
<foo xml:lang="fr" xmlns:xi="http://www.w3.org/2001/XInclude">
<bar xml:base="file.xml" xml:lang="fr"/>
</foo>
Thanks for your responce.
DALDEI wrote:
>
> On which element did you get xml:lang=""
>
> ----------------------------------------
> David A. Lee
> dlee@calldei.com
> http://www.xmlsh.org
>
>
> -----Original Message-----
> From: polymorphisme [mailto:webmaster@polymorphisme.org]
> Sent: Tuesday, October 09, 2012 2:23 PM
> To: j-users@xerces.apache.org
> Subject: XInclude and xml:lang
>
>
> My question is very simple.
> I have a main file :
> <foo xml:lang="fr" xmlns:xi="http://www.w3.org/2001/XInclude">
> <xi:include href="file.xml"/>
> </foo>
>
> and the file.xml : <bar/>
>
> When I do a test with the exemple sax.Writer, I obtain the attribut
> xml:lang="" !
> Why I can't obtain xml:lang="fr" ou nothing since I have foo xml:lang="fr"
> ?
>
> sax.Writer -xi src/resources/xerces/xerces-xi.xml
> <foo xml:lang="fr" xmlns:xi="http://www.w3.org/2001/XInclude">
> <bar xml:base="file.xml" xml:lang=""/>
> </foo>
>
> Regard.
> --
> View this message in context:
> http://old.nabble.com/XInclude-and-xml%3Alang-tp34533941p34533941.html
> Sent from the Xerces - J - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org
>
>
>
--
View this message in context: http://old.nabble.com/XInclude-and-xml%3Alang-tp34533941p34537130.html
Sent from the Xerces - J - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org
RE: XInclude and xml:lang
Posted by polymorphisme <we...@polymorphisme.org>.
I have not understand why I obtain <bar xml:base="file.xml" xml:lang=""/>,
like this :
<foo xml:lang="fr" xmlns:xi="http://www.w3.org/2001/XInclude">
<bar xml:base="file.xml" xml:lang=""/>
</foo>
It's no very logic.
For example, with XPath, //bar/xml:lang return something like this : "";
so what in fact, the langage's bar is "fr".
Why I haven't or can't obtain something like this :
<foo xml:lang="fr" xmlns:xi="http://www.w3.org/2001/XInclude">
<bar xml:base="file.xml"/>
</foo>
or this :
<foo xml:lang="fr" xmlns:xi="http://www.w3.org/2001/XInclude">
<bar xml:base="file.xml" xml:lang="fr"/>
</foo>
Thanks for your responce.
DALDEI wrote:
>
> On which element did you get xml:lang=""
>
> ----------------------------------------
> David A. Lee
> dlee@calldei.com
> http://www.xmlsh.org
>
>
> -----Original Message-----
> From: polymorphisme [mailto:webmaster@polymorphisme.org]
> Sent: Tuesday, October 09, 2012 2:23 PM
> To: j-users@xerces.apache.org
> Subject: XInclude and xml:lang
>
>
> My question is very simple.
> I have a main file :
> <foo xml:lang="fr" xmlns:xi="http://www.w3.org/2001/XInclude">
> <xi:include href="file.xml"/>
> </foo>
>
> and the file.xml : <bar/>
>
> When I do a test with the exemple sax.Writer, I obtain the attribut
> xml:lang="" !
> Why I can't obtain xml:lang="fr" ou nothing since I have foo xml:lang="fr"
> ?
>
> sax.Writer -xi src/resources/xerces/xerces-xi.xml
> <foo xml:lang="fr" xmlns:xi="http://www.w3.org/2001/XInclude">
> <bar xml:base="file.xml" xml:lang=""/>
> </foo>
>
> Regard.
> --
> View this message in context:
> http://old.nabble.com/XInclude-and-xml%3Alang-tp34533941p34533941.html
> Sent from the Xerces - J - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org
>
>
>
--
View this message in context: http://old.nabble.com/XInclude-and-xml%3Alang-tp34533941p34537130.html
Sent from the Xerces - J - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org
RE: XInclude and xml:lang
Posted by David Lee <dl...@calldei.com>.
On which element did you get xml:lang=""
----------------------------------------
David A. Lee
dlee@calldei.com
http://www.xmlsh.org
-----Original Message-----
From: polymorphisme [mailto:webmaster@polymorphisme.org]
Sent: Tuesday, October 09, 2012 2:23 PM
To: j-users@xerces.apache.org
Subject: XInclude and xml:lang
My question is very simple.
I have a main file :
<foo xml:lang="fr" xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="file.xml"/>
</foo>
and the file.xml : <bar/>
When I do a test with the exemple sax.Writer, I obtain the attribut
xml:lang="" !
Why I can't obtain xml:lang="fr" ou nothing since I have foo xml:lang="fr" ?
sax.Writer -xi src/resources/xerces/xerces-xi.xml
<foo xml:lang="fr" xmlns:xi="http://www.w3.org/2001/XInclude">
<bar xml:base="file.xml" xml:lang=""/>
</foo>
Regard.
--
View this message in context: http://old.nabble.com/XInclude-and-xml%3Alang-tp34533941p34533941.html
Sent from the Xerces - J - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org