RE: Applying multiple styles using span tag problem
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
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]
Applying multiple styles using span tag problem
Hi 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'] fo:inline text-decoration=underline xsl:apply-templates/ /fo:inline /xsl:template xsl:template match=html:[EMAIL PROTECTED]'font-family: Times; font-size: 12pt']|html:[EMAIL PROTECTED]'font-size:Normalpt'] fo:block font-size=12pt font-family=Times xsl:apply-templates/ /fo:block /xsl:template But only one of them is getting applied.I want to know how both the styles can be applied recursively. Thanks and Regards Rohit - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Applying multiple styles using span tag problem
-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
-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]