 |
| XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

August 17th, 2007, 08:24 AM
|
|
Authorized User
|
|
Join Date: Aug 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Placing Table in a Header or Footer
I am working on XSL version 1.1 to generate word doc for some text.
I need to place a table in the Header and Footer of this document but I'm not able to achieve this by placing <fo:table> inside <fo:static-content flow-name="xsl-region-after"> of the doc. As the table is always created in the body and not in the Header or footer of the table. If anyone has any idea please Help!
|
|

August 25th, 2007, 06:07 PM
|
|
Friend of Wrox
|
|
Join Date: Jul 2006
Posts: 430
Thanks: 28
Thanked 5 Times in 5 Posts
|
|
I am confused. Are you creating a PDF or RTF (rich text format). RTF doesn't use FO: but writes to text:
E.g.
<xsl:variable name="rowstyle1">
<xsl:text>\trrh0</xsl:text>
<xsl:text>\clvertalc\clpadl0\clpadfl3\clpadb0\clpa dfb3\clpadt0\clpadft3\clpadr0\clpadfr3\cellx</xsl:text>
<xsl:value-of select="ceiling(($columnwidth0_0) * 1440.000)" />
<xsl:text>\clvertalc\clpadl0\clpadfl3\clpadb0\clpa dfb3\clpadt0\clpadft3\clpadr0\clpadfr3\cellx</xsl:text>
<xsl:value-of select="ceiling(($columnwidth0_0 + $columnwidth0_1) * 1440.000)" />
</xsl:variable>
|
|

August 30th, 2007, 01:21 AM
|
|
Authorized User
|
|
Join Date: Aug 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks a lot for replying
I am creating RTF, but I didn't get the example you referred
Can you please throw some more light on this?
|
|

September 10th, 2007, 02:24 AM
|
|
Authorized User
|
|
Join Date: Aug 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I tried using <table> inside <xsl:text> also, but it says
"table is not allowed in this position in the stylesheet!"
Here 'this position' means '<fo:static-content flow-name="xsl-region-after">'
Anyone has any more idea, please reply!
|
|

September 10th, 2007, 02:48 AM
|
 |
Wrox Author
|
|
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
|
|
Why did you put a <table> element inside <xsl:text>? The only thing allowed inside xsl:text is text.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
|
|

September 10th, 2007, 02:53 AM
|
|
Authorized User
|
|
Join Date: Aug 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Please have a look the first post.
I am new to XSL and I was trying to place a table in Header of RTF. I couldn't achieve it by using <fo:table> so I tried using this approach as was suggested in second post
|
|

September 10th, 2007, 03:05 AM
|
 |
Wrox Author
|
|
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
|
|
The second post used xsl:text because it was writing text, which is what RTF is. If you're outputting XSL-FO elements then you're not outputting text so you don't need xsl:text. Are you trying to output RTF, or XSL-FO? The solutions will be completely different for the two cases.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
|
|

September 10th, 2007, 04:19 AM
|
|
Authorized User
|
|
Join Date: Aug 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks Michael,
I am writing RTF and I am outputting XSL-FO elements to this so, essentially I am trying to output XSL-FO.
Can you please suggest a solution for this?
|
|

September 10th, 2007, 04:32 AM
|
 |
Wrox Author
|
|
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
|
|
No, sorry, I can't help with XSL-FO questions.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
|
|

September 10th, 2007, 06:53 AM
|
|
Friend of Wrox
|
|
Join Date: Jul 2006
Posts: 430
Thanks: 28
Thanked 5 Times in 5 Posts
|
|
I believe you are mixing apples and oranges. XSLT and XSL-FO produce different output from XML.
XSLT - transforms XML into Text, Html, RTF, XML
XSL-FO transforms XML into PDF
You said " I am writing RTF and I am outputting XSL-FO elements to this so, essentially I am trying to output XSL-FO."- i dont think ths is possible. What exactly are you trying to create from XML (PDF or RTF)?
If you are trying to produce RTF you will need to learn both XSLT and RTF syntax ( http://www.biblioscape.com/rtf15_spec.htm). Altova has a great tool called Stylevision that writes most of this for you.
Bones
|
|
 |