This is the error
javax.xml.transform.TransformerConfigurationException: stylesheet requires
attribute: version
        at
org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(Transformer
FactoryImpl.java:650)
        at com.icard.handlers.PDFManager.execute(Unknown Source)
        at com.icard.servlet.GenericServlet.doGet(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:271)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:311)
        at
org.apache.jserv.JServConnection.processRequest(JServConnection.java:317)
        at org.apache.jserv.JServConnection.run(JServConnectio

And this is the XSL styleSheet

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

<?xml-stylesheet type="text/xsl"
href="c:\enhydra\xml1\assistcard\com\icard\xml\voucher.xsl"?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:fo="http://www.w3.org/1999/XSL/Format";>

<xsl:template match="vouchers">

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>

<xsl:for-each select="voucher">

<fo:layout-master-set>

<fo:simple-page-master page-height="14in" page-width="8.5in"
margin-top="35mm" margin-left="28mm" margin-right="14mm">

<fo:region-body/>

<fo:region-before extent="0mm"/>

</fo:simple-page-master>

</fo:layout-master-set>

<fo:page-sequence master-name="simple">

<fo:flow flow-name="xsl-region-body">

<fo:block font-size="10pt">

<xsl:call-template name="voucher"/>

</fo:block>

</fo:flow>

</fo:page-sequence>

</xsl:for-each>

</fo:root>

</xsl:template>

<xsl:template match="//vouchers/voucher" name="voucher">

<xsl:apply-templates select="cliente"/>

<xsl:apply-templates select="producto"/>

<xsl:apply-templates select="agencia"/>

<xsl:apply-templates select="seguroEmitido"/>

<xsl:apply-templates select="seguro"/>

<fo:table-cell>

<fo:block margin-left="0mm" padding-top="16pt">

<xsl:apply-templates select="@pais"/>&#160;<xsl:apply-templates
select="@codigo"/>&#160;<xsl:apply-templates select="@tipo_pax_voucher"/>

<xsl:apply-templates select="@sufijo_voucher"/>

</fo:block>

<fo:block margin-left="0mm" padding-top="5mm">EXPIRES:<xsl:apply-templates
select="@fec_vig_fin"/>

</fo:block>

<fo:block margin-left="0mm" padding-top="83mm">

<xsl:apply-templates select="@fecha_emision"/>

</fo:block>

<fo:block margin-left="88mm" padding-top="86pt" font-size="9pt">

<xsl:apply-templates select="@fec_vig_inic"/>

</fo:block>

<fo:block margin-left="88mm" padding-top="1mm"
font-size="9pt">------------</fo:block>

<fo:block margin-left="88mm" padding-top="1mm"
font-size="9pt">------------</fo:block>

<xsl:if test="//seguro/compania != ''">

<fo:block margin-left="0mm" padding-top="82mm">

<xsl:apply-templates select="@cant_dias"/>

</fo:block>

</xsl:if>

</fo:table-cell>

<fo:table-cell>

<fo:block margin-left="90mm" padding-top="16pt">

<xsl:apply-templates select="@pais"/>&#160;<xsl:apply-templates
select="@codigo"/>&#160;<xsl:apply-templates select="@tipo_pax_voucher"/>

<xsl:apply-templates select="@sufijo_voucher"/>

</fo:block>

<fo:block margin-left="90mm" padding-top="5mm">EXPIRES:<xsl:apply-templates
select="@fec_vig_fin"/>

</fo:block>

<fo:block margin-left="90mm" padding-top="117pt">

<xsl:apply-templates select="@pais"/>&#160;<xsl:apply-templates
select="@codigo"/>&#160;<xsl:apply-templates select="@tipo_pax_voucher"/>

<xsl:apply-templates select="@sufijo_voucher"/>

</fo:block>

<fo:block margin-left="90mm" padding-top="5mm">EXPIRES:<xsl:apply-templates
select="@fec_vig_fin"/>

</fo:block>

<fo:block margin-left="111mm" padding-top="179pt" font-size="9pt">

<xsl:apply-templates select="@fec_vig_fin"/>

</fo:block>

<fo:block margin-left="111mm" padding-top="1mm"
font-size="9pt">-------------</fo:block>

<fo:block margin-left="111mm" padding-top="1mm"
font-size="9pt">-------------</fo:block>

<xsl:if test="//seguro/compania != ''">

<fo:block margin-left="45mm" padding-top="82mm">

<xsl:apply-templates select="@fec_vig_inic"/>

</fo:block>

</xsl:if>

</fo:table-cell>

<fo:table-cell>

<fo:block margin-left="110mm" padding-top="93mm">

<xsl:apply-templates select="@pais"/>&#160;<xsl:apply-templates
select="@codigo"/>&#160;<xsl:apply-templates select="@tipo_pax_voucher"/>

<xsl:apply-templates select="@sufijo_voucher"/>

</fo:block>

<fo:block margin-left="133mm" padding-top="39mm" font-size="9pt">

<xsl:apply-templates select="@area"/>

</fo:block>

<fo:block margin-left="133mm" padding-top="1mm"
font-size="9pt">---</fo:block>

<fo:block margin-left="133mm" padding-top="1mm"
font-size="9pt">---</fo:block>

</fo:table-cell>

<fo:table-cell>

<fo:block margin-left="165mm" padding-top="136mm" font-size="9pt">

<xsl:apply-templates select="@tarifa_impresa"/>

</fo:block>

<fo:block margin-left="165mm" padding-top="1mm" font-size="9pt">

<xsl:apply-templates select="@tax_impuesto"/>

</fo:block>

<fo:block margin-left="165mm" padding-top="1mm" font-size="9pt">

<xsl:apply-templates select="@tax_emitida"/>

</fo:block>

<fo:block margin-left="156mm" padding-top="4mm">

<xsl:apply-templates select="@cant_dias"/>

</fo:block>

</fo:table-cell>

</xsl:template>

<xsl:template match="//voucher/cliente" name="cliente">

<fo:table-cell>

<fo:block margin-left="0mm" padding-top="10mm">

<xsl:apply-templates select="apellido"/>&#160;<xsl:apply-templates
select="nombre"/>

</fo:block>

<fo:block margin-left="0mm" padding-top="97mm">

<xsl:apply-templates select="apellido"/>&#160;<xsl:apply-templates
select="nombre"/>

</fo:block>

<fo:block margin-left="0mm" padding-top="4mm">

<xsl:apply-templates select="dom_calle"/>&#160;<xsl:apply-templates
select="dom_nro"/>

</fo:block>

<fo:block margin-left="0mm" padding-top="5mm">

<xsl:apply-templates select="emerg_contacto"/>

</fo:block>

<fo:block margin-left="0mm" padding-top="12pt">

<xsl:apply-templates select="emerg_tel1"/>

</fo:block>

<fo:block margin-left="0mm" padding-top="13pt">

<xsl:apply-templates select="emerg_pais"/>

</fo:block>

<fo:block margin-left="0mm" padding-top="14pt">

<xsl:apply-templates select="emerg_calle"/>&#160;<xsl:apply-templates
select="emerg_nro"/>&#160;<xsl:apply-templates
select="emerg_piso"/>&#160;<xsl:apply-templates select="emerg_puerta"/>

</fo:block>

<xsl:if test="//seguro/compania != ''">

<fo:block margin-left="0mm" padding-top="54mm">

<xsl:apply-templates select="apellido"/>&#160;<xsl:apply-templates
select="nombre"/>

</fo:block>

</xsl:if>

</fo:table-cell>

<fo:table-cell>

<fo:block margin-left="68mm" padding-top="111mm">

<xsl:apply-templates select="sexo"/>

</fo:block>

</fo:table-cell>

<fo:table-cell>

<fo:block margin-left="80mm" padding-top="111mm">

<xsl:apply-templates select="edad"/>

</fo:block>

<fo:block margin-left="78mm" padding-top="4mm">

<xsl:apply-templates select="dom_cp"/>

</fo:block>

</fo:table-cell>

<fo:table-cell>

<fo:block margin-left="90mm" padding-top="10mm">

<xsl:apply-templates select="apellido"/>&#160;<xsl:apply-templates
select="nombre"/>

</fo:block>

<fo:block margin-left="90mm" padding-top="50mm">

<xsl:apply-templates select="apellido"/>&#160;<xsl:apply-templates
select="nombre"/>

</fo:block>

<fo:block margin-left="101mm" padding-top="122pt">

<xsl:apply-templates select="pasaporte"/>

</fo:block>

<fo:block margin-left="113mm" padding-top="4mm">

<xsl:apply-templates select="dom_ciudad"/>

</fo:block>

<fo:block margin-left="95mm" padding-top="5mm">

<xsl:apply-templates select="emerg_email"/>

</fo:block>

</fo:table-cell>

<fo:table-cell>

<fo:block margin-left="140mm" padding-top="111mm">

<xsl:apply-templates select="tel_particular"/>

</fo:block>

<fo:block margin-left="152mm" padding-top="4mm">

<xsl:apply-templates select="dom_country"/>

</fo:block>

</fo:table-cell>

</xsl:template>

<xsl:template match="//voucher/producto" name="producto">

<fo:table-cell>

<fo:block margin-left="0mm" padding-top="55pt">

<xsl:apply-templates select="nombre"/>

</fo:block>

</fo:table-cell>

<fo:table-cell>

<fo:block margin-left="90mm" padding-top="55pt">

<xsl:apply-templates select="nombre"/>

</fo:block>

<fo:block margin-left="90mm" padding-top="50mm">

<xsl:apply-templates select="nombre"/>

</fo:block>

<fo:block margin-left="130mm" padding-top="25mm">

<xsl:apply-templates select="nombre"/>

</fo:block>

</fo:table-cell>

</xsl:template>

<xsl:template match="agencia" name="agencia">

<fo:table-cell>

<fo:block margin-left="60mm" padding-top="102mm" font-size="9pt">

<xsl:apply-templates select="codigo"/>&#160;-&#160;<xsl:apply-templates
select="nombre_comercial"/>

</fo:block>

<xsl:if test="//seguro/compania != ''">

<fo:block margin-left="93mm" padding-top="135mm" font-size="9pt">

<xsl:apply-templates select="codigo"/>&#160;-&#160;<xsl:apply-templates
select="nombre_comercial"/>

</fo:block>

<fo:block margin-left="93mm" padding-top="2mm" font-size="9pt">

<xsl:apply-templates select="ciudad"/>

</fo:block>

</xsl:if>

</fo:table-cell>

</xsl:template>

<xsl:template match="seguroEmitido" name="seguroEmitido">

<fo:table-cell>

<fo:block margin-left="0mm" padding-top="221mm">

<xsl:apply-templates select="nroVoucher"/>

</fo:block>

<fo:block margin-left="0mm" padding-top="14mm">

<xsl:apply-templates select="nro_recibo"/>

</fo:block>

</fo:table-cell>

<fo:table-cell>

<fo:block margin-left="45mm" padding-top="239mm">

<xsl:apply-templates select="fec_recibo"/>

</fo:block>

</fo:table-cell>

<fo:table-cell>

<fo:block margin-left="100mm" padding-top="208mm">

<xsl:apply-templates select="nro_certificado"/>

</fo:block>

</fo:table-cell>

</xsl:template>

<xsl:template match="seguro" name="seguro">

<fo:table-cell>

<fo:block margin-left="0mm" padding-top="203mm">

<xsl:apply-templates select="compania"/>

</fo:block>

</fo:table-cell>

<fo:table-cell>

<fo:block margin-left="155mm" padding-top="208mm">

<xsl:apply-templates select="poliza"/>

</fo:block>

<fo:block margin-left="155mm" padding-top="9mm">

<xsl:apply-templates select="tope"/>

</fo:block>

<fo:block margin-left="155mm" padding-top="1pt">

<xsl:apply-templates select="tope_aereo"/>

</fo:block>

<fo:block margin-left="155mm" padding-top="1pt">

<xsl:apply-templates select="tope_terrestre"/>

</fo:block>

<fo:block margin-left="155mm" padding-top="0pt">

<xsl:apply-templates select="total"/>

</fo:block>

</fo:table-cell>

</xsl:template>

</xsl:stylesheet>


----- Original Message -----
From: "Ralf Steppacher" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 31, 2002 12:18 PM
Subject: Re: wrong namespace??


> So looking at what you just said this
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
> xmlns:fo="http://www.w3.org/1999/XSL/Format"; >
>
> should be right..

Yes.


> But im still getting the same error..
>
> any ideas?

No, sorry. Perhaps someone else?

Could you post your stylesheet?


Ralf

> ----- Original Message -----
> From: "Ralf Steppacher" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, May 31, 2002 4:46 AM
> Subject: Re: wrong namespace??
>
>
>
>>><xsl:stylesheet version="1.0"
>>
>> > xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
>> >
>> > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
>> > xmlns:fo="http://www.w3.org/1999/XSL/Format"; version="1.0">
>> >
>> > wich one is right?...
>>
>>If you write a stylesheet that contains formatting objects you have to
>>include both the Transform and Format namespace.
>>
>>
>> > i seem to get the error anyway with both namespaces... =(
>>
>>The version attribute has nothing to do with namespace declarations.
>>The version attribute is the only mandatory attribute of the stylesheet
>>element. Be sure there are no typos.
>>
>>See http://www.w3.org/TR/xslt#stylesheet-element.
>>
>>
>>Ralf
>>
>
>
>
>




Reply via email to