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: Using XSL parameter inside XSL attribute?


 Hi,

it's not directly a DocBook question but because I'm creating an XSL-FO
transformation for a DocBook documentation my question kind of fits in
here...

The transformation chain is as follows:

- Starting a transformation batch file with a parameter via command line
  - "transf.bat bar"

- The batch file calls Saxon, handing over a parameter
  - [several Saxon options] foo=bar [other parameters]

- The Saxon uses my docbook_custom.xsl

- In the docbook_custom.xsl I'm declaring a parameter
  - <xsl:param name="foo"/>.

This parameter handover works so far.

If I want the value of this parameter used as content e.g. in a
fo:block, this would be realised like this:

<fo:block>
  Parameter: <xsl:value-of select = "$foo" />
</fo:block>

"transf.bat test" will result in "Parameter: test" somewhere in the
document after the transformation.

So far so good.

But I'm looking for a way to use the parameter $foo as part of an fo
attribute, e.g.:

<fo:external-graphic src="url('images/logo_###.svg')" />

where "###" is the value of the parameter $foo.

When calling "transf.bat basic" the transformation should use the image
logo_basic.svg.

The <xsl:value-of select = "$foo" /> don't want to be used inside
attributes, or I didn't find the solution yet...

Is there a convenient way to realise this.

I would be grateful for tips or alternatives.

Cheers from Aachen, Germany
Michael




Attachment: signature.asc
Description: OpenPGP digital signature



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