Jump to content

Search the Community

Showing results for tags 'xsl:fo'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Found 2 results

  1. Hi, I am not a developer, but I have to deal with xslt to format xml and generate pdfs occasionally for work. below you can see the XML and the XSL I am trying to format it with. It all worked fine until I tried to insert the second template. Obviously I am doing something wrong. I am trying to use template and for-each to add a row in the table for each <order_line_item> nested under <order_line_items> and in each of the four cells there should be the four values nested under <order_line_item> Could you help? Thanks! I was told that you cannot nest templates, so obviously that needs correction. Could someone provide a worked out solution please? XML <hash> <order_line_items type="array"> <order_line_item> <document_currency_unit_price_after_discount_value amount="300.0" code="GBP">£300.00</document_currency_unit_price_after_discount_value> <document_currency_net_after_main_discount amount="300.0" code="GBP">£300.00</document_currency_net_after_main_discount> <description>Subscription</description> <unit_quantity type="decimal">1.0</unit_quantity> </order_line_item> <order_line_item> <document_currency_unit_price_after_discount_value amount="300.0" code="GBP">£200.00</document_currency_unit_price_after_discount_value> <document_currency_net_after_main_discount amount="300.0" code="GBP">£200.00</document_currency_net_after_main_discount> <description>Additional Services</description> <unit_quantity type="decimal">1.0</unit_quantity> </order_line_item> <order_line_item> <document_currency_unit_price_after_discount_value amount="300.0" code="GBP">£-50.00</document_currency_unit_price_after_discount_value> <document_currency_net_after_main_discount amount="300.0" code="GBP">£-50.00</document_currency_net_after_main_discount> <description>Discount</description> <unit_quantity type="decimal">1.0</unit_quantity> </order_line_item> </order_line_items> </hash> XSL <fo:table margin-bottom="5mm"> <fo:table-column column-width="25%"/> <fo:table-column column-width="25%"/> <fo:table-column column-width="25%"/> <fo:table-column column-width="25%"/> <fo:table-body> <fo:table-row> <fo:table-cell> <fo:block> Product </fo:block> </fo:table-cell> <fo:table-cell> <fo:block> Quantity </fo:block> </fo:table-cell> <fo:table-cell> <fo:block> Unit Price </fo:block> </fo:table-cell> <fo:table-cell> <fo:block> Net Amount </fo:block> </fo:table-cell> </fo:table-row> <xsl:template match="hash/order_line_items"> <xsl:for-each select="order_line_item"> <fo:table-row> <fo:table-cell> <fo:block> <xsl:value-of select="description"> </fo:block> </fo:table-cell> <fo:table-cell> <fo:block> <xsl:value-of select="document_currency_unit_price_after_discount_value"> </fo:block> </fo:table-cell> <fo:table-cell> <fo:block> <xsl:value-of select="document_currency_net_after_main_discount"> </fo:block> </fo:table-cell> <fo:table-cell> <fo:block> <xsl:value-of select="unit_quantity"> </fo:block> </fo:table-cell> </fo:table-row> </xsl:for-each> </xsl:template> </fo:table-body> </fo:table> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> </xslt:stylesheet>
  2. I'm a total newbie what comes to xsl:fo, so please advise me how get following requirement done.I've created a very complicated (in my opinion and compared to my knowledge and skills) xslt to generate xhtml from xml, now this needs to be transformed on demand (from that xhtml page since paging with alternating footers and headers seems to be impossible with other methods) as PDF.What is the best way to accomplish this?I thought that it could be done with javascript empedded to this xhtml page, Is there a xsl:fo styleseets available that would transform xhtml to PDF or perhaps some converter that would generate some xsl:fo templates based on existing xslt or xhtml?
  • Create New...