piotridzikowski Posted March 28, 2006 Share Posted March 28, 2006 Hi.I need to break line in xml-fo. I have somethingt like this:xsl-template <fo:block><xsl:value-of select="/some/someThing"/></fo:block> and at xml file: <some><someThing>first Linesecound Linebla bla bla</someThing></some> result pdf looks: 'first Line secound Line bla bla bla'What should I do to make xsl-fo to breaks lines?GreetingsPiotr Idzikowski Link to comment Share on other sites More sharing options...
boen_robot Posted March 28, 2006 Share Posted March 28, 2006 Place some kind of breackers in the XML file itself (why do you think the <br /> in HTML was invented for?) and then create an XSLT template with somethink like this: <xsl:template match="NameOfTheTagYouAreGoingToUseAsLineBreaker"><BR/> <xsl:apply-templates/></xsl:template> copyright: paetje Link to comment Share on other sites More sharing options...
piotridzikowski Posted March 29, 2006 Author Share Posted March 29, 2006 I dont't thing that <br/> is correct tag in xsl-fo.But i've found the answer: <fo:block linefeed-treatment="preserve"> <xsl:value-of ......../></fo:block> And now xsl-fo processor respect new lines from source xml. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now