Re: fo tags not inserted
Andreas L. Delmelle wrote: For starters, you have no matching template for poem elements, so the poem/title and poem/verse elements never get reached by the apply-templates... This is just plain wrong. It is the whole purpose of the default templates to get all matching template applied without having to define a template for each and every element which might happen to occur in intermediate nodes. Or do you think of something different? J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: fo tags not inserted
Thanks for your help. I solved the problem. The problem turned out to be with w3.org.Document, I did several rounds of transformations from xml to document then to xml string, fo tags were lost during the process. cheers, --- "Andreas L. Delmelle" <[EMAIL PROTECTED]> wrote: > > -Original Message- > > From: Rick Col [mailto:[EMAIL PROTECTED] > > > > Hi, > > > This is a piece of sample code from XSLT Quickly, > it > > does not work the way as its author said. > > > > For starters, you have no matching template for poem > elements, so the > poem/title and poem/verse elements never get reached > by the > apply-templates... only their textual content to > which the default template > rule is applied (basically: just copy the text) > > If there is only one poem in your source XML, you > could change the root > matching template (match="/") to match the poem root > (match="/poem"). IIC, > that should do the trick. > > Another (very minor) detail: > > > > xsl document: > > > > > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; > > xmlns:fo="http://www.w3.org/1999/XSL/Format";> > > > > > > > > > > xmlns:fo="http://www.w3.org/1999/XSL/Format";> > > > > You don't need to specify the FO namespace again on > fo:root. It's already > defined on the xsl:stylesheet element, so your > result tree will > automatically be in that namespace. > > > HTH! > > Greetz, > > Andreas > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: fo tags not inserted
> -Original Message- > From: Rick Col [mailto:[EMAIL PROTECTED] > Hi, > This is a piece of sample code from XSLT Quickly, it > does not work the way as its author said. > For starters, you have no matching template for poem elements, so the poem/title and poem/verse elements never get reached by the apply-templates... only their textual content to which the default template rule is applied (basically: just copy the text) If there is only one poem in your source XML, you could change the root matching template (match="/") to match the poem root (match="/poem"). IIC, that should do the trick. Another (very minor) detail: > > xsl document: > > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; > xmlns:fo="http://www.w3.org/1999/XSL/Format";> > > > > > http://www.w3.org/1999/XSL/Format";> > You don't need to specify the FO namespace again on fo:root. It's already defined on the xsl:stylesheet element, so your result tree will automatically be in that namespace. HTH! Greetz, Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
fo tags not inserted
Hi, guys: I am a xsl-fo newbie. This is a piece of sample code from XSLT Quickly, it does not work the way as its author said. xml document: Paradise Lost Him thus intent Ithuriel with his spear xsl document: http://www.w3.org/1999/XSL/Transform"; xmlns:fo="http://www.w3.org/1999/XSL/Format";> http://www.w3.org/1999/XSL/Format";> The result: http://www.w3.org/1999/XSL/Format";> Paradise Lost Him thus intent Ithuriel with his spear What I want is to insert fo:block, fo:inline tags inside fo:flow. surrounding verse/title/prop. Can anyone tell what I did wrong? regards, __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]