OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] AW: [docbook] How to get the lang-attribute ina stylesheet?


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: tom_schr@web.de [mailto:tom_schr@web.de] 
> Gesendet: Sonntag, 03. Februar 2008 18:47
> An: docbook@lists.oasis-open.org
> 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
>
>
>   



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]