RE: Applying multiple styles using span tag problem

2004-11-25 Thread rohit . rastogi

Thanks Adreas,I will work it from here. Its realy a fantastic idea.
Regards
Rohit




  Andreas L.   

  DelmelleTo:  [EMAIL PROTECTED] 
  
  [EMAIL PROTECTED] cc:
  
  ndora.beSubject: RE: Applying multiple 
styles using span tag problem 


  11/24/2004 05:57  

  PM

  Please respond

  to fop-user   








 -Original Message-
 From: Andreas L. Delmelle [mailto:[EMAIL PROTECTED]

[Slight adjustment + addition:]


 xsl:template match=span
   fo:block
 xsl:apply-templates select=@style /
   /fo:block
 /xsl:template


You can create an fo:block or an fo:inline here, depending on whether the
span has any span ancestors, or better even, create a separate matching
template for it.

 xsl:template match=@style
   xsl:param name=prop-string select=. /

And to make this latter template a bit more generic --and to add a level of
control over the generated property names/values--, you could provide a
mapping of some sort in a separate XML or in a different namespace in the
stylesheet...

Greetz,

Andreas


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Applying multiple styles using span tag problem

2004-11-25 Thread rohit . rastogi

I am trying to write an XSLT-FO  for generating PDF for the XHTML Content.

Regards
Rohit



  
  Andreas L.   
  
  DelmelleTo:  [EMAIL PROTECTED] 

  [EMAIL PROTECTED] cc:

  ndora.beSubject: RE: Applying multiple 
styles using span tag problem   

  
  11/24/2004 05:39  
  
  PM
  
  Please respond
  
  to fop-user   
  

  

  



 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

Hi,

First of all, it may be worth mentioning that this question is actually
better suited for an XSLT-related list.

Furtermore...

 I have a span tag which looks like

 span style=font-family:Times;text-decoration:underlineThank you for
 investing in our services/span

 In my xsl-fo I have templates as
   xsl:template match=html:[EMAIL PROTECTED]
='text-decoration:underline']
snip /
   xsl:template
match=html:[EMAIL PROTECTED]'font-family:Times;font-size:12pt']
   | html:[EMAIL PROTECTED]'font-size:Normalpt']
snip /

None of the above would be a match for the described span element. It would
help if you could provide us with a more complete picture of what you're
trying to do, but something like this may be of help:

xsl:template match=span
  fo:block
xsl:apply-templates select=@style
  xsl:with-param name=prop-string select=@style /
/xsl:apply-templates
  /fo:block
/xsl:template

xsl:template match=@style
  xsl:param name=prop-string select='' /

  xsl:choose
xsl:when test=contains($prop-string,';')
  xsl:attribute name={substring-before($prop-string,':')}
xsl:value-of select=substring-before(substring-after(
 $prop-string,':'),';') /
  /xsl:attribute
  xsl:apply-templates select=.
xsl:with-param name=prop-string
select=substring-after($prop-string,';') /
  /xsl:apply-templates
/xsl:when
xsl:otherwise
  xsl:attribute name={substring-before($prop-string,':')}
xsl:value-of select=substring-after($prop-string,':') /
  /xsl:attribute
/xsl:otherwise
  /xsl:choose
/xsl:template

Hope this helps!

Greetz,

Andreas


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Applying multiple styles using span tag problem

2004-11-24 Thread Andreas L. Delmelle
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

Hi,

First of all, it may be worth mentioning that this question is actually
better suited for an XSLT-related list.

Furtermore...

 I have a span tag which looks like

 span style=font-family:Times;text-decoration:underlineThank you for
 investing in our services/span

 In my xsl-fo I have templates as
   xsl:template match=html:[EMAIL 
 PROTECTED]'text-decoration:underline']
snip /
   xsl:template
match=html:[EMAIL PROTECTED]'font-family:Times;font-size:12pt']
   | html:[EMAIL PROTECTED]'font-size:Normalpt']
snip /

None of the above would be a match for the described span element. It would
help if you could provide us with a more complete picture of what you're
trying to do, but something like this may be of help:

xsl:template match=span
  fo:block
xsl:apply-templates select=@style
  xsl:with-param name=prop-string select=@style /
/xsl:apply-templates
  /fo:block
/xsl:template

xsl:template match=@style
  xsl:param name=prop-string select='' /

  xsl:choose
xsl:when test=contains($prop-string,';')
  xsl:attribute name={substring-before($prop-string,':')}
xsl:value-of select=substring-before(substring-after(
 $prop-string,':'),';') /
  /xsl:attribute
  xsl:apply-templates select=.
xsl:with-param name=prop-string
select=substring-after($prop-string,';') /
  /xsl:apply-templates
/xsl:when
xsl:otherwise
  xsl:attribute name={substring-before($prop-string,':')}
xsl:value-of select=substring-after($prop-string,':') /
  /xsl:attribute
/xsl:otherwise
  /xsl:choose
/xsl:template

Hope this helps!

Greetz,

Andreas


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Applying multiple styles using span tag problem

2004-11-24 Thread Andreas L. Delmelle
 -Original Message-
 From: Andreas L. Delmelle [mailto:[EMAIL PROTECTED]

[Slight adjustment + addition:]


 xsl:template match=span
   fo:block
 xsl:apply-templates select=@style /
   /fo:block
 /xsl:template


You can create an fo:block or an fo:inline here, depending on whether the
span has any span ancestors, or better even, create a separate matching
template for it.

 xsl:template match=@style
   xsl:param name=prop-string select=. /

And to make this latter template a bit more generic --and to add a level of
control over the generated property names/values--, you could provide a
mapping of some sort in a separate XML or in a different namespace in the
stylesheet...

Greetz,

Andreas


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]