[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

How to copy a string containing attributes into an element?

Subject: How to copy a string containing attributes into an element?
From: Jan Kohnert <J.Kohnert@xxxxxxxxxxx>
Date: Wed, 30 Jun 2004 16:21:41 +0200
copy a string
Hello List,

In my stylesheet, I perform two steps to generate FO. First, I dissolve any
references inside the XML source data, building an temporary result tree.
Second, I apply over the temporary result tree, generating the FO code
itself.

While dissolving the references I use saxon's "function" extension to return
the dissolved values.
To apply succesfully over the tempory result tree, I need to store any
information stored in FO as attributes also as attributes in the temporary
result tree.

Therefor I want to copy a string as returned from the function example below
into an element as a "attribute set": (X PATH is short for the real X Path,
that is quite long..)

<saxon:function name="fun:GetAppearance">
<xsl:param name="appearance"/>
<xsl:variable name="Appearanceset">
<xsl:value-of select="concat( 'border=&quot;', fun:GetBorder( X PATH ),
'&quot; ',
                              'background-color=&quot;', fun:GetColor( X
PATH ), '&quot; ',
                              fun:GetMargin( X PATH ))"/>

</xsl:variable>
<saxon:return select="$Appearanceset"/>
</saxon:function    

Returns (for example): 
border="0.5pt solid #FFAAAA" background-color="#CDCDCD" margin=""
margin-top="5mm" margin-bottom="7mm" margin-right="2mm" margin-left="5mm" 

(There is also a concat in "fun:GetMargin()" !)

what I want is, for example, to put this string into an <block-container>
element.
<block-container border="0.5pt solid #FFAAAA" background-color="#CDCDCD"
margin="" margin-top="5mm" margin-bottom="7mm" margin-right="2mm"
margin-left="5mm" >

Is this possible? and when, how?

Thanks!

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.