[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?
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="', fun:GetBorder( X PATH ), '" ', 'background-color="', fun:GetColor( X PATH ), '" ', 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!
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|