Using XSL parameter inside XSL attribute?

[email protected]
Newsgroups gmane.text.docbook.apps
Message-ID <[email protected]>
 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
signature.asc (application/pgp-signature, 819 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJeRCctAAoJEIR7o6OSthAdc4cP/2OIUsEmkBCh4jNb3PmtvgVB
xgE6vAWRzN2QjtAhk+9kWlhHuxpXRo48EaX8CJjEEgolu7AJ/kiMlboBlcxIt8Ko
n57xgmcCHdVmNZGPreWr0S0yVpsH/qdR/dpPKxaSe5wDv6bgTIslGmpCq4HRAxT1
CvDSd1k2HS/+IPa9B595SIXeM+MjP3ztv6ZQiOhSFDesP0A7WYBdHSuqH/FPlh9k
wBCFWvrhvgCxy0mXG1KmNoDGXYiVmVHvbERe3y38uRN6YnSLcMEjHn5OSxMjiBtx
YzytrnpwNkTpO1b672ZHvkKdQBnkgy/ZKJZbM3Yqy03UXeT01DWr3bEZ1xnkczpQ
70U0vV1I1Su7jWm3baVXGpbCsCp1PguvXBs6vjNGUQ7aZhSbIXSEgVAXa87JVtST
AgkxNuL5NTFOoDCD9O8/A0HKPk/eZVGsoOP/wVw4Vmss63gR3+OI/B4bi6+5TaQ9
vuy8l2A/lNYMBYnEwrIe4w3rq+e/JP4QmkfQvexop5F7swEvd0zZ3o2qBps9uZvi
tMD3UTB8voLS2uwgo3u7tr8xjzsWW1fXk3PCdrFOKG3+LR+m4AFEDFhBHV+GS37r
T/5UMmwCyvRFazK6AcJ1jlwkOJUu9nu1J6e73IfRVO/gm3/LSryYi9cdjC22abWJ
+yOA5w/YUKUV7bMKzY1f
=eukB
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.