You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Mike Kellstrand <ke...@yahoo.com> on 2004/05/27 21:57:22 UTC
Can I put formatting tags in the XML file?
This must be a common issue, but I haven't found a good solution after a lot of searching.
The problem:
I have an XML file containing a lot of text. (I'm working on book layouts)
Sometimes a word here and there in the text needs to be bolded or underlined in the final PDF. Of course adding any kind of inline FO tags in the source XML gets real nasty.
How is this best dealt with?
Many thanks,
Mike Kellstrand
---------------------------------
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger
Re: Can I put formatting tags in the XML file?
Posted by Mike Kellstrand <ke...@yahoo.com>.
Sweet!
I knew it would be something simple.
Thanks Chris,
Mike
Chris Bowditch <bo...@hotmail.com> wrote:
Mike Kellstrand wrote:
> This must be a common issue, but I haven't found a good solution after a
> lot of searching.
>
> The problem:
> I have an XML file containing a lot of text. (I'm working on book layouts)
> Sometimes a word here and there in the text needs to be bolded or
> underlined in the final PDF. Of course adding any kind of inline FO
> tags in the source XML gets real nasty.
>
> How is this best dealt with?
Whats wrong with just placing tags around text you want to make bold
in the output. In your XSLT that processes your XML just have a template that
matches for these tags and output the appropriate FO. E.g.
Chris
---------------------------------
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger
Re: Can I put formatting tags in the XML file?
Posted by Chris Bowditch <bo...@hotmail.com>.
Mike Kellstrand wrote:
> This must be a common issue, but I haven't found a good solution after a
> lot of searching.
>
> The problem:
> I have an XML file containing a lot of text. (I'm working on book layouts)
> Sometimes a word here and there in the text needs to be bolded or
> underlined in the final PDF. Of course adding any kind of inline FO
> tags in the source XML gets real nasty.
>
> How is this best dealt with?
Whats wrong with just placing <B></B> tags around text you want to make bold
in the output. In your XSLT that processes your XML just have a template that
matches for these tags and output the appropriate FO. E.g.
<xsl:template match="B">
<fo:inline font-weight="bold">
<xsl:apply-templates/>
</fo:inline>
</xsl:template>
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org