xsl fo style from xml
Joined: 29 Aug 2011
Topic: xsl fo style from xml
Posted: 29 Aug 2011 at 9:05am
My xml attribute holds this value
style = color:red;background-color:red;
now i have modified and got in an xsl variable as
$style which holds color="red" background-color="red"
now i have to place this xsl variable near fo:inline
that is <fo:inline $style>
so that it should be rendered as <fo:inline color="red" background-color="red">
how can i place the xsl variable $style inisde fo:inline tag
Any suggesstions. Thanks in Advance.
Joined: 19 May 2008
|Post Options Quote Reply Posted: 29 Aug 2011 at 12:24pm|
In your case, you can use xsl:attribute. Check the following link for more information about this xsl element: http://www.w3schools.com/xsl/el_attribute.asp
First you need to write an xsl:template that splits and applies these style attributes from your xml.
The template should look something like this:
After writing it, you need to call this template in your fo:inline element and looks like this:
Note: The call template must be the first child of the fo:inline element.
Edited by radup - 29 Aug 2011 at 12:30pm
I'm happy when my mind is free and my senses are occupied.
|Forum Jump||Forum Permissions
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum