Someother stylesheet expert may give you a better advice, as I am not
that advanced. However, if I were you I will do this in one of two ways:
method one: assign a variable then use it as an attribute in your tag.
For example:
<xsl:variable name="myLang">
<xsl:value-of select='@lang' />
</xsl:variable>
<presentation xml:lang="$myLang" default="true" displayviews="true"
displayviewimages="true">
method 2: is to output the results of the transformation using
<xsl:element> and <xsl:attrribute>.
<xsl:element name="presentation">
<xsl:attribute name=" xml:lang">
<xsl:value-of select='@lang'"/>
</xsl:attribute>
<xsl:attribute name="default">true </xsl:attribute>
<xsl:attribute name="displayviews"> true</xsl:attribute>
<xsl:attribute name="displayviewimages">true</xsl:attribute>
</xsl:element>
Christian-Josef Schrattenthaler wrote:
Hi Tom!
Sorry, I am not good with stylesheets. I didn't need them, bevore I worked with
DocBook.
I tried:
<presentation xml:lang="xsl:value-of select='@lang'" default="true" displayviews="true"
displayviewimages="true">
But this didn't work.
Can you please give me a hint?
Thanks,
Christian.
-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Gesendet: Sonntag, 03. Februar 2008 18:47
An: [EMAIL PROTECTED]
Betreff: Re: [docbook] How to get the lang-attribute in a stylesheet?
Hi Christian,
On Sonntag, 3. Februar 2008, Christian-Josef Schrattenthaler wrote:
I have startet to change the javahelp.xsl, to fit the version 2.0. Now
I want to read the lang-attribute, I set in the Docbook file by <book
lang="de">.
I can get the title with $title, but I didn't find some information
about the other available variables from my DocBook file.
Did you try the XPath "@lang" in your respective template?
Bye,
Tom
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]