XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
+ Stylus Studio Technical Forum (14621)
+ Website Feedback (249)
- XSLT Help and Discussion (7625)
-> + How to add page number in to v... (2)
-> + XSL Grouping (7)
-> + Repeat images using FOR EACH l... (7)
-> + How to get File name (2)
-> + image and text on the same lin... (2)
-> + Create XSLT stylesheets for us... (2)
-> + Merge Multiple Files While Che... (2)
-> + xslt 3 level or multi level gr... (6)
-> + How to create xsl which will c... (2)
-> + xsl:variable and Result Tree F... (7)
-> - XSL-FO fo:table continued from... (1)
-> + XSLT Java issue (2)
-> + problem with hyperlink (4)
-> + substring-after function probl... (4)
-> + Xalan Processing (3)
-> + Memory utilization high with m... (2)
-> + check all parent node groups s... (2)
-> + CSV DOC to XML CONVERSION (11)
-> + XSLT: Ordered List (based on r... (4)
-> + XSLT Mapping - Issue (4)
-> + XSL following-sibling, how to ... (5)
-> + need xslt elements help (2)
-> + Dynamic generation of URL in X... (2)
-> + List Created from Section Navi... (2)
-> + xslt elements help (2)
-> + Map field if source is not nul... (3)
-> + XSLT group and sort whith gene... (4)
-> + Nested XML value (2)
-> + Specifying condition with coun... (4)
-> + xsl:function using found in er... (4)
-> + How to remove an unwanted spac... (2)
-> + Question about variable substi... (2)
-> + XSL for Comparing nodes and di... (4)
-> + External lookup list (8)
-> + XSL HTML output now needs to b... (2)
-> + Adding a new sub element to th... (4)
-> + How do I get rid of 'Tip' node... (9)
-> + Trying to dynamically create n... (2)
-> + Display XML link, using XSLT a... (9)
-> + calling templates based on ord... (2)
-> + How to add internal links usin... (4)
-> + How to call user defined java ... (3)
-> + XSLT and WebApps past and futu... (3)
-> + passing condition through java... (3)
-> + Apllying a template from withi... (4)
-> + Getting xsl element in javascr... (3)
-> + The document() function inside... (3)
-> + Footnote text move to para (2)
-> + XSL: multiple element come to ... (3)
-> + How to use following-sibling &... (2)
-> + How to use FOP 0.95 with Stylu... (4)
-> + Error during creating PDF from... (2)
-> + Help creating a comma delimite... (4)
-> + Selective Add using XSLT recur... (3)
-> + Help: convert without parent e... (2)
-> - Correct my substring function ... (1)
-> + Old xsl into reports (4)
-> + How to save xslt converted fil... (3)
-> + How to find non tagging text? (5)
-> + Help: Hex entity to Character... (6)
-> + EDI QUOTES MESSAGE NEED TO REP... (2)
-> + How to convert in multi level ... (4)
-> + Need some help with a styleshe... (3)
-> - Conditional Formattinf Formula... (1)
-> + Creating HTML Unordered LIsts.... (2)
-> + xslt params uknown number of i... (2)
-> + How to use fonts other than ba... (2)
-> - Converting existing HTML into ... (1)
-> + Help to tune up this XSLT (2)
-> + XSLT - is only converting the ... (2)
-> + XSLT Editor tab (4)
-> + Convert multiple files from XM... (2)
-> + how to use in select expressi... (2)
-> + Help needed in XSL transformat... (2)
-> + How to add a string with math ... (5)
-> + How to add a string with math ... (6)
-> - br element (1)
-> + Stylesheet directed terminatio... (2)
-> + Who can help me whit sum funct... (2)
-> + XSLT Works in Stylus Studio, n... (3)
-> - Filter by Attribute (1)
-> + Display x number of items whic... (6)
-> + MultiColumn Reporting (3)
-> + cant get namespace declaration... (3)
-> + Performance xsl:for each and n... (3)
-> + How to assign value to a XSLT ... (3)
-> + Select element value based on ... (2)
-> + Version 10 of Saxon? (8)
-> + How to get the value of a node... (5)
-> + Display Xpath using (4)
-> + XSLT to report (2)
-> + xslt help for a noobie (2)
-> - XSL-FO XML to PDF with XSLT (3)
-> ->XSL-FO XML to PDF with XS...
-> ->XSL-FO XML to PDF with XS...
-> + Using XSLT to transform XML to... (4)
-> + XSLT to sort a list alphabetic... (4)
-> + How to Get Colum Values based ... (2)
-> + non persisting predicate filte... (5)
-> + HTML to XSLT (2)
-> + extra carriage returns in "csv... (2)
-> + extra carriage returns in "csv... (3)
-- Previous [301-320] [321-340] [341-360] Next
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
Fernando TorresSubject: XSL-FO XML to PDF with XSLT
Author: Fernando Torres
Date: 12 Mar 2009 05:14 PM
Hi guys i'm trying to convert an XML file to PDF File i'm using XSL-FO
my XML file have namespace and schemalocation if I remove those from the XML file de transformation works if I put those in the XML files the transformation fails with "A well-formed document requires a root element"

Here is my code of my XML file

<?xml version="1.0" encoding="UTF-8"?>
<Comprobante xmlns="http://www.sat.gob.mx/cfd/2" xsi:schemaLocation="http://www.sat.gob.mx/cfd/2 http://www.sat.gob.mx/sitio_internet/cfd/2/cfdv2.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" fecha="2007-01-20T11:22:56" folio="0337515" noAprobacion="1" noCertificado="10001200000000022517" serie="A" version="2.0" anoAprobacion="2008" formaDePago="Efectivo" subTotal="2289.97" total="2633.47" tipoDeComprobante="ingreso" sello="DOk8TpozSBf4CIC0aQRaShYa2qcIo4+NWJZFntrkSVFlITNJIn4OGs7WMgrUR80Dm2+9YbRfhZ2XJC3ec7auhZ9UcXaRFOQMlBR67DgNgJ0s77CCUxPH6ymQsSfsid5HqSYHSvMqIo8X8pTk0xc4awR/EHGsnmeGfKgDIasuGIw=" >
<Emisor nombre="G.P. ELECTROMECÁNICA, S.A. DE C.V." rfc="GPE8410012I9">
<DomicilioFiscal calle="Blvd. a Zacatecas" noExterior="201" colonia="Col. Industrial" codigoPostal="20030" estado="Aguascalientes" municipio="Aguascalientes" pais="México"/>
<ExpedidoEn calle="Blvd. a Zacatecas" noExterior="201" colonia="Col. Industrial" codigoPostal="20030" estado="Aguascalientes" municipio="Aguascalientes" pais="México"/>
</Emisor>
<Receptor nombre="FRIGORIZADOS LA HUERTA S.A. DE C.V." rfc="FHU750301AR6">
<Domicilio calle="CALLE " noExterior="1 No. 140MEDIO KILO" colonia="RANCHO MEDIO KILO" codigoPostal="20350" estado="AGS" localidad="SAN FRANCISCO DE LOS ROMO" municipio="SAN FRANCISCO DE LOS ROMO" pais="MEX"/>
</Receptor>
<Conceptos>
<Concepto cantidad="6" descripcion="CONECTOR RECTO P/SAPA DE 19 mm" importe="26.94" unidad="Pieza" valorUnitario="4.49"/>
<Concepto cantidad="6" descripcion="CONECTOR CURVO P/SAPA DE 19 mm" importe="57.66" unidad="Pieza" valorUnitario="9.61"/>
<Concepto cantidad="6" descripcion="CONECTOR RECTO LIQUID TIGHT DE 25 mm" importe="129.36" unidad="Pieza" valorUnitario="21.56"/>
<Concepto cantidad="6" descripcion="CONECTOR CURVO LIQUID TIGHT DE 25 mm" importe="194.04" unidad="Pieza" valorUnitario="32.34"/>
<Concepto cantidad="6" descripcion="TUBO LIQUID TIGHT DE 13 mm CARRETE 350 MTS" importe="75.78" unidad="Metro" valorUnitario="12.63"/>
<Concepto cantidad="6" descripcion="CONECTOR RECTO LIQUID TIGHT DE 13 mm" importe="60.66" unidad="Pieza" valorUnitario="10.11"/>
<Concepto cantidad="6" descripcion="CONECTOR CURVO LIQUID TIGHT DE 13 mm" importe="97.32" unidad="Pieza" valorUnitario="16.22"/>
<Concepto cantidad="10" descripcion="CONDULET T-29 19 mm SERIE 9 C/TAPA DOMEX" importe="325.8" unidad="Pieza" valorUnitario="32.58"/>
<Concepto cantidad="5" descripcion="CONDULET 13 mm LL-19 SERIE 9 C/TAPA CROUSE HINDS" importe="117.45" unidad="Pieza" valorUnitario="23.49"/>
<Concepto cantidad="5" descripcion="CONDULET 13 mm LR-19 SERIE 9 C/TAPA DOMEX" importe="117.45" unidad="Pieza" valorUnitario="23.49"/>
<Concepto cantidad="5" descripcion="CONDULET 25 mm LR-39 SERIE 9 C/TAPA DOMEX" importe="193.25" unidad="Pieza" valorUnitario="38.65"/>
<Concepto cantidad="5" descripcion="CONDULET 25 mm LL-39 SERIE 9 C/TAPA CROUSE HINDS" importe="193.25" unidad="Pieza" valorUnitario="38.65"/>
<Concepto cantidad="1" descripcion="CONDULET T-39 25 mm SERIE 9 C/TAPA DOMEX" importe="43.19" unidad="Pieza" valorUnitario="43.19"/>
<Concepto cantidad="1" descripcion="CONTACTO DE CAJA P/PISO 4 UNIDADES SC3092" importe="351.65" unidad="Pieza" valorUnitario="351.65"/>
<Concepto cantidad="6" descripcion="MONITOR GALVANIZADO DE 13 mm" importe="8.34" unidad="Pieza" valorUnitario="1.39"/>
<Concepto cantidad="6" descripcion="MONITOR GALVANIZADO DE 19 mm" importe="12.24" unidad="Pieza" valorUnitario="2.04"/>
<Concepto cantidad="6" descripcion="MONITOR GALVANIZADO DE 25 mm" importe="17.16" unidad="Pieza" valorUnitario="2.86"/>
<Concepto cantidad="6" descripcion="MONITOR GALVANIZADO DE 51 mm" importe="55.38" unidad="Pieza" valorUnitario="9.23"/>
<Concepto cantidad="1" descripcion="INT.TERM. 2 POLOS 15A CLASE 730 QO215 SQUARE D" importe="176.17" unidad="Pieza" valorUnitario="176.17"/>
<Concepto cantidad="4" descripcion="REDUCCION DE 25 A 19mm" importe="36.88" unidad="Pieza" valorUnitario="9.22"/>
</Conceptos>
<Impuestos>
<Traslados>
<Traslado importe="343.5" tasa="15.0" impuesto="IVA"/>
</Traslados>
</Impuestos>
</Comprobante>



And Here is my XSL File


<?xml version="1.0" encoding="UTF-8" ?>

<!-- New document created with EditiX at Mon Nov 03 15:37:32 CST 2008 -->


<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="Comprobante">
<fo:root>

<fo:layout-master-set>
<fo:simple-page-master master-name="my-page">
<fo:region-body region-name="cuerpo" margin-top="8cm" margin-left="1cm" margin-right="1cm" margin-bottom="2cm"/>
<fo:region-before region-name="encabezado" extent="8cm" />
<fo:region-after region-name="piepagina" extent="1cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="my-page">
<fo:static-content flow-name="encabezado" >

<xsl:apply-templates select="Emisor"/>
<fo:block space-after.optimum="40pt"><xsl:apply-templates select="Receptor"/> </fo:block>
</fo:static-content>
<fo:static-content flow-name="piepagina">
<fo:block margin-left="1cm" font-size="10pt" >Página <fo:page-number/></fo:block>
</fo:static-content>

<fo:flow flow-name="cuerpo">
<fo:block>
<fo:block space-after.optimum="50pt"><xsl:apply-templates select="Conceptos"/></fo:block>
</fo:block>
<fo:table space-after.optimum="50pt">
<fo:table-column column-width="14.5cm"/>
<fo:table-column column-width="1.83cm"/>
<fo:table-column column-width="2.5cm"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell >
<fo:block font-size="8pt" >"Debo(emos) y Pagare(mos) incondicionalmente por éste pagare a la orden de <xsl:value-of select="Emisor/@nombre"/> en la ciudad que se expide la presente, el importe de este documento."</fo:block>
</fo:table-cell>
<fo:table-cell border-style="groove" border-color="gray" background-color="blue">
<fo:block font-size="8pt" color="white" text-align="center" font-weight="bold">SUBTOTAL:</fo:block>
</fo:table-cell>
<fo:table-cell border-style="groove" border-color="gray">
<fo:block font-size="8pt" text-align="center" font-weight="bold"><xsl:value-of select="./@subTotal"/></fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block font-size="8pt" >CANTIDAD CON LETRA</fo:block>
</fo:table-cell>
<fo:table-cell border-style="groove" border-color="gray" background-color="blue">
<fo:block font-size="8pt" color="white" text-align="center" font-weight="bold">IVA 15%:</fo:block>
</fo:table-cell>
<fo:table-cell border-style="groove" border-color="gray">
<fo:block font-size="8pt" text-align="center" font-weight="bold"><xsl:value-of select="Impuestos/Traslados/Traslado/@importe"/></fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block font-size="8pt" ><xsl:value-of select="/Comprobante/Addenda/CantidadL/@valor"/></fo:block>
</fo:table-cell>
<fo:table-cell border-style="groove" border-color="gray" background-color="blue">
<fo:block font-size="8pt" color="white" text-align="center" font-weight="bold">TOTAL:</fo:block>
</fo:table-cell>
<fo:table-cell border-style="groove" border-color="gray">
<fo:block font-size="8pt" text-align="center" font-weight="bold"><xsl:value-of select="./@total"/></fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
<fo:block font-size="10pt" text-align="start" start-indent="1cm" space-after.optimum="10pt" >
<fo:table >
<fo:table-column column-width="1cm" />
<fo:table-column column-width="15cm" />
<fo:table-body border-color="gray" >
<fo:table-row >
<fo:table-cell>
<fo:block font-size="8pt" text-align="start" start-indent="5pt" >Sello digital:</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block font-size="7pt" end-indent="10pt" ><xsl:value-of select="./@sello"/></fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
<fo:block font-size="8pt" text-align="center">"Este documento es una impresión de un Comprobante Fiscal Digital"</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="Emisor">
<fo:table margin-top="0.75cm" margin-left="1.5cm">
<fo:table-column column-width="2cm"/>
<fo:table-column column-width="12cm"/>
<fo:table-column column-width="3.5cm" />
<fo:table-body>
<fo:table-row>
<fo:table-cell >
<fo:block start-indent="0cm" >
<fo:external-graphic src="c:\FER\logo_gp.jpg" />
</fo:block>
</fo:table-cell>
<fo:table-cell >
<fo:block font-size="18pt" color="#000099" text-align="center" font-weight="bold" margin-top="0.25cm" ><xsl:value-of select="./@nombre"/></fo:block>
<fo:block font-size="8pt" color="#000099" text-align="center" ><xsl:value-of select="DomicilioFiscal/@calle"/>, No. <xsl:value-of select="DomicilioFiscal/@noExterior"/> C.P.<xsl:value-of select="DomicilioFiscal/@codigoPostal"/>, <xsl:value-of select="DomicilioFiscal/@estado"/>,<xsl:value-of select="DomicilioFiscal/@municipio"/> ,<xsl:value-of select="DomicilioFiscal/@pais"/></fo:block>
<fo:block font-size="8pt" color="#000099" text-align="center" >TELS: (449) 914-45-14 al 17 FAX: (449) 914-37-99 R.F.C <xsl:value-of select="./@rfc"/></fo:block>
<fo:block font-size="8pt" color="#000099" text-align="center" >www.gpelectromecanica.com.mx email:gpventas@gpelectromecanica.com.mx</fo:block>
</fo:table-cell>
<fo:table-cell >
<fo:block font-size="6pt" text-align="justify" space-after.optimum="3pt">PARA CUALQUIER DEVOLUCIÓN SE TENDRÁ UN PLAZO MÁXIMO DE 15 DIAS FECHA FACTURA</fo:block>
<fo:block font-size="7pt" text-align="center">Expedida en</fo:block>
<fo:block font-size="7pt" text-align="center"><xsl:value-of select="ExpedidoEn/@estado"/>,<xsl:value-of select="ExpedidoEn/@municipio"/>.</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</xsl:template>
<xsl:template match="Receptor">
<fo:table margin="1cm" >
<fo:table-column column-width="10cm" />
<fo:table-column column-width="4.5cm" />
<fo:table-column column-width="4.5cm" />
<fo:table-body border="solid" >
<fo:table-row>
<fo:table-cell background-color="#000099" border="solid">
<fo:block font-size="8pt" color="white" text-align="center" >CLIENTE</fo:block>
</fo:table-cell>
<fo:table-cell background-color="#000099" border="solid">
<fo:block font-size="8pt" color="white" text-align="center">Serie</fo:block>
</fo:table-cell>
<fo:table-cell background-color="#000099" border="solid">
<fo:block font-size="8pt" color="white" text-align="center">Folio</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row >
<fo:table-cell>
<fo:block font-size="8pt"><xsl:value-of select="./@nombre"/></fo:block>
</fo:table-cell>
<fo:table-cell border="solid">
<fo:block font-size="8pt" text-align="center" ><xsl:value-of select="/Comprobante/@serie"/></fo:block>
</fo:table-cell>
<fo:table-cell border="solid">
<fo:block font-size="8pt" text-align="center"><xsl:value-of select="/Comprobante/@folio"/></fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block font-size="8pt">R.F.C. <xsl:value-of select="./@rfc"/></fo:block>
</fo:table-cell>
<fo:table-cell background-color="#000099" border="solid">
<fo:block font-size="8pt" color="white" text-align="center" >Fecha y Hora</fo:block>
</fo:table-cell>
<fo:table-cell background-color="#000099" border="solid">
<fo:block font-size="8pt" color="white" text-align="center">No. Aprobación</fo:block>
</fo:table-cell>
</fo:table-row>
<xsl:apply-templates select="Domicilio"/>
</fo:table-body>
</fo:table>
</xsl:template>
<xsl:template match="Domicilio">
<fo:table-row>
<fo:table-cell>
<fo:block font-size="8pt"><xsl:value-of select="./@calle"/> , <xsl:value-of select="./@noExterior"/></fo:block>
</fo:table-cell>
<fo:table-cell border="solid">
<fo:block font-size="8pt" text-align="center" ><xsl:value-of select="/Comprobante/@fecha"/></fo:block>
</fo:table-cell>
<fo:table-cell border="solid">
<fo:block font-size="8pt" text-align="center" ><xsl:value-of select="/Comprobante/@noAprobacion"/></fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block font-size="8pt"><xsl:value-of select="./@colonia"/> C.P.<xsl:value-of select="./@codigoPostal"/></fo:block>
</fo:table-cell>
<fo:table-cell background-color="#000099" border="solid">
<fo:block font-size="8pt" color="white" text-align="center" >No. cliente</fo:block>
</fo:table-cell>
<fo:table-cell background-color="#000099" border="solid">
<fo:block font-size="8pt" color="white" text-align="center" >Serie del Certificado</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block font-size="8pt" ><xsl:value-of select="./@referencia"/><xsl:value-of select="./@municipio"/> ,<xsl:value-of select="./@estado"/> ,<xsl:value-of select="./@pais"/></fo:block>
</fo:table-cell>
<fo:table-cell border="solid">
<fo:block font-size="8pt" text-align="center" ><xsl:value-of select="/Comprobante/Addenda/NoCte/@valor"/></fo:block>
</fo:table-cell>
<fo:table-cell border="solid">
<fo:block font-size="8pt" text-align="center" ><xsl:value-of select="/Comprobante/@noCertificado"/></fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:template>

<xsl:template match="Conceptos">
<fo:table width="15cm" border="solid">
<fo:table-column column-width="0.75cm" />
<fo:table-column column-width="1.5cm" />
<fo:table-column column-width="2cm" />
<fo:table-column column-width="7cm" />
<fo:table-column column-width="1.5cm" />
<fo:table-column column-width="1.83cm" />
<fo:table-column column-width="1.83cm" />
<fo:table-column column-width="2.5cm" />
<fo:table-header border-color="gray">
<fo:table-cell border-style="groove" border-color="gray" background-color="blue">
<fo:block font-size="7pt" color="white" text-align="center" font-weight="bold">P</fo:block>
</fo:table-cell>

<fo:table-cell border-style="groove" border-color="gray" background-color="blue">
<fo:block font-size="7pt" color="white" text-align="center" font-weight="bold">CLAVE</fo:block>
</fo:table-cell>
<fo:table-cell border-style="groove" border-color="gray" background-color="blue">
<fo:block font-size="7pt" color="white" text-align="center" font-weight="bold">COD. PROV</fo:block>
</fo:table-cell>
<fo:table-cell border-style="groove" border-color="gray" background-color="blue">
<fo:block font-size="7pt" color="white" text-align="center" font-weight="bold" >DESCRIPCIÓN</fo:block>
</fo:table-cell>
<fo:table-cell border-style="groove" border-color="gray" background-color="blue">
<fo:block font-size="7pt" color="white" text-align="center" font-weight="bold">UNIDAD</fo:block>
</fo:table-cell>
<fo:table-cell border-style="groove" border-color="gray" background-color="blue">
<fo:block font-size="7pt" color="white" text-align="center" font-weight="bold">CANTIDAD</fo:block>
</fo:table-cell>
<fo:table-cell border-style="groove" background-color="blue">
<fo:block font-size="7pt" color="white" text-align="center" font-weight="bold">PRECIO U.</fo:block>
</fo:table-cell>
<fo:table-cell border-style="groove" background-color="blue">
<fo:block font-size="7pt" color="white" text-align="center" font-weight="bold">IMPORTE</fo:block>
</fo:table-cell>
</fo:table-header>
<fo:table-body height="15cm" border-color="gray" >

<xsl:apply-templates select="Concepto"/>
<xsl:apply-templates select="Addenda/Codigo"/>
</fo:table-body>
</fo:table>
</xsl:template>
<xsl:template match="Addenda/Codigo">
<fo:table-row>
<fo:table-cell border-style="groove" border-color="gray">
<fo:block font-size="7pt" text-align="center">1</fo:block>
</fo:table-cell>
<fo:table-cell border-style="groove" border-color="gray">
<fo:block font-size="7pt" text-align="center"><xsl:value-of select="./@Clave"/></fo:block>
</fo:table-cell>
<fo:table-cell border-style="groove" border-color="gray">
<fo:block font-size="7pt" text-align="center"><xsl:value-of select="./@CodProv"/></fo:block>
</fo:table-cell>
<fo:table-cell border-style="groove" border-color="gray">
<fo:block font-size="7pt" text-align="left"><xsl:value-of select="./@descripcion"/></fo:block>
</fo:table-cell>
<fo:table-cell border-style="groove" border-color="gray">
<fo:block font-size="7pt" text-align="center"><xsl:value-of select="./@unidad"/></fo:block>
</fo:table-cell>
<fo:table-cell border-style="groove" border-color="gray">
<fo:block font-size="7pt" text-align="center"><xsl:value-of select="./@cantidad"/></fo:block>
</fo:table-cell>
<fo:table-cell border-style="groove" border-color="gray">
<fo:block font-size="7pt" text-align="center">$<xsl:value-of select="./@valorUnitario"/></fo:block>
</fo:table-cell>
<fo:table-cell border-style="groove" border-color="gray">
<fo:block font-size="7pt" text-align="center">$<xsl:value-of select="./@importe"/></fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:template>
<xsl:template match="Concepto">
<fo:table-row>
<fo:table-cell border-style="groove" border-color="gray">
<fo:block font-size="7pt" text-align="center">1</fo:block>
</fo:table-cell>
<fo:table-cell border-style="groove" border-color="gray">
<fo:block font-size="7pt" text-align="center">clave</fo:block>
</fo:table-cell>
<fo:table-cell border-style="groove" border-color="gray">
<fo:block font-size="7pt" text-align="center">cod prov</fo:block>
</fo:table-cell>
<fo:table-cell border-style="groove" border-color="gray">
<fo:block font-size="7pt" text-align="left"><xsl:value-of select="./@descripcion"/></fo:block>
</fo:table-cell>
<fo:table-cell border-style="groove" border-color="gray">
<fo:block font-size="7pt" text-align="center"><xsl:value-of select="./@unidad"/></fo:block>
</fo:table-cell>
<fo:table-cell border-style="groove" border-color="gray">
<fo:block font-size="7pt" text-align="center"><xsl:value-of select="./@cantidad"/></fo:block>
</fo:table-cell>
<fo:table-cell border-style="groove" border-color="gray">
<fo:block font-size="7pt" text-align="center">$<xsl:value-of select="./@valorUnitario"/></fo:block>
</fo:table-cell>
<fo:table-cell border-style="groove" border-color="gray">
<fo:block font-size="7pt" text-align="center">$<xsl:value-of select="./@importe"/></fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:template>
</xsl:stylesheet>




Any help? I appreciate it


UnknownFacturaOK.xml
XML to transform

UnknownFacturas.xsl
XSL Transformation

Postnext
John BamptonSubject: XSL-FO XML to PDF with XSLT
Author: John Bampton
Date: 13 Mar 2009 01:21 AM
Hi, replace

<xsl:template match="Comprobante">

with <xsl:template match="/">

and then configure the other apply templates with the right xpaths

Thanks, John Bampton

Posttop
Fernando TorresSubject: XSL-FO XML to PDF with XSLT
Author: Fernando Torres
Date: 13 Mar 2009 01:21 PM
Can you put an example? please

   
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.