You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Fabrizio Caldas <fn...@hotmail.com> on 2005/07/21 23:28:14 UTC

Problem when link has "contentid"

Hello,

I have an XSLT and an XML file, which I use to generate a PDF.

Both those files work fine except for one circumstance.

This is an example of how I have data in the XML.
<Item>
  <text>Some text here </text>
  <a href="http://www.example.com/fop/test.jsp?contentID=1234">please click 
here</a>
  <text> more text here.</text>
</Item>

And this is the data in the XSL:
<!-- =============================== -->
<!-- child element: a                -->
<!-- =============================== -->
<xsl:template match="a">
  <fo:basic-link color="blue" external-destination="{@href}">
    <fo:inline><xsl:value-of select="text()"/></fo:inline>
  </fo:basic-link>
</xsl:template>

When the link contains "contentID" the PDF creation generates an error:
[ERROR] The reference to entity "contentID" must end with the ';' delimiter.
org.apache.fop.apps.FOPException: The reference to entity "contentID" must 
end with the ';'

Does anyone know how I can make the "contentID" be interpreted as ordinary 
text and not as a reference to entity?

Thanks in advance,

Fabrizio.

_________________________________________________________________
Chegou o que faltava: MSN Acesso Grátis. Instale Já! 
http://www.msn.com.br/discador


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Problem when link has "contentid"

Posted by Fabrizio Caldas <fn...@hotmail.com>.
It works so well that it doesn't even show in the e-mail.
http://www.example.com/fop/test.jsp?pageType=page'&amp;'contentID=1234

>From: "Fabrizio Caldas" <fn...@hotmail.com>
>Reply-To: fop-users@xmlgraphics.apache.org
>To: fop-users@xmlgraphics.apache.org
>Subject: Re: Problem when link has "contentid"
>Date: Fri, 22 Jul 2005 11:21:26 -0300
>
>That did the trick.
>
>Now this is how the link is in my xml:
>http://www.example.com/fop/test.jsp?pageType=page&amp;contentID=1234
>
>Thanks Andreas.
>
>Thanks for all you guys help.
>
>>From: Andreas L.Delmelle <a_...@pandora.be>
>>Reply-To: fop-users@xmlgraphics.apache.org
>>To: fop-users@xmlgraphics.apache.org
>>Subject: Re: Problem when link has "contentid"
>>Date: Fri, 22 Jul 2005 16:11:02 +0200
>>
>>On Jul 22, 2005, at 14:57, Fabrizio Caldas wrote:
>>
>>Hi,
>>
>>>This is a better example f the link I'm using:
>>>http://www.example.com/fop/test.jsp?pageType=page&contentID=1234
>>>
>>
>>In this case you should escape the ampersand in the original file, so make 
>>it '&amp;' instead of plain '&'. Neither XML nor HTML allow plain 
>>unescaped ampersands. In any case, your browser shouldn't have a problem 
>>if you make it:
>>
>>http://www.example.com/fop/test.jsp?pageType=page&amp;contentID=1234"
>>
>>HTH!
>>
>>Greetz,
>>
>>Andreas
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>>For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>
>
>_________________________________________________________________
>MSN Messenger: converse online com seus amigos .  
>http://messenger.msn.com.br
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>

_________________________________________________________________
MSN Messenger: converse online com seus amigos .  
http://messenger.msn.com.br


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Problem when link has "contentid"

Posted by Fabrizio Caldas <fn...@hotmail.com>.
That did the trick.

Now this is how the link is in my xml:
http://www.example.com/fop/test.jsp?pageType=page&amp;contentID=1234

Thanks Andreas.

Thanks for all you guys help.

>From: Andreas L.Delmelle <a_...@pandora.be>
>Reply-To: fop-users@xmlgraphics.apache.org
>To: fop-users@xmlgraphics.apache.org
>Subject: Re: Problem when link has "contentid"
>Date: Fri, 22 Jul 2005 16:11:02 +0200
>
>On Jul 22, 2005, at 14:57, Fabrizio Caldas wrote:
>
>Hi,
>
>>This is a better example f the link I'm using:
>>http://www.example.com/fop/test.jsp?pageType=page&contentID=1234
>>
>
>In this case you should escape the ampersand in the original file, so make 
>it '&amp;' instead of plain '&'. Neither XML nor HTML allow plain unescaped 
>ampersands. In any case, your browser shouldn't have a problem if you make 
>it:
>
>http://www.example.com/fop/test.jsp?pageType=page&amp;contentID=1234"
>
>HTH!
>
>Greetz,
>
>Andreas
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>

_________________________________________________________________
MSN Messenger: converse online com seus amigos .  
http://messenger.msn.com.br


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Problem when link has "contentid"

Posted by "Andreas L.Delmelle" <a_...@pandora.be>.
On Jul 22, 2005, at 14:57, Fabrizio Caldas wrote:

Hi,

> This is a better example f the link I'm using:
> http://www.example.com/fop/test.jsp?pageType=page&contentID=1234
>

In this case you should escape the ampersand in the original file, so 
make it '&amp;' instead of plain '&'. Neither XML nor HTML allow plain 
unescaped ampersands. In any case, your browser shouldn't have a 
problem if you make it:

http://www.example.com/fop/test.jsp?pageType=page&amp;contentID=1234"

HTH!

Greetz,

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Problem when link has "contentid"

Posted by Fabrizio Caldas <fn...@hotmail.com>.
I got the same error transforming it to XSL-FO.

So its not even transforming it to XSL-FO:
javax.xml.transform.TransformerException: The reference to entity 
"contentID" must end with the ';' delimiter.

I am using the url() function:
<!-- =============================== -->
<!-- child element: a                -->
<!-- =============================== -->
<xsl:template match="a">
  <fo:basic-link color="blue" external-destination="url({@href})">
    <xsl:value-of select="."/>
  </fo:basic-link>
</xsl:template>

Fabrizio.

>From: Mike Trotman <mi...@datalucid.com>
>Reply-To: fop-users@xmlgraphics.apache.org
>To: fop-users@xmlgraphics.apache.org
>Subject: Re: Problem when link has "contentid"
>Date: Fri, 22 Jul 2005 14:26:05 +0100
>
>Are you using the 'url()' function (which may provide url 
>encoding/escaping)?
>
>I'm not sure at which stage of the process the error is being thrown
>- so don't know if it's a problem in the XSLT stage, or the FO=>PDF stage.
>
>Producing an FO file from your XML (using XSLT),
>inspecting the FO file
>and then processing the FO file with FOP would identify which part of the 
>process causes the problem.
>
>Mike
>
>Fabrizio Caldas wrote:
>
>>Mike,
>>
>>You're right, my example link is no coherent with the one I use.
>>This is a better example f the link I'm using:
>>http://www.example.com/fop/test.jsp?pageType=page&contentID=1234
>>
>>If I switch the pageType and contentID I get a same error but with the 
>>pageType:
>>The reference to entity "pageType" must end with the ';' delimiter.
>>
>>So I guess that any link that I have with a & will have this problem.
>>
>>Fabrizio.
>>
>>>From: Mike Trotman <mi...@datalucid.com>
>>>Reply-To: fop-users@xmlgraphics.apache.org
>>>To: fop-users@xmlgraphics.apache.org
>>>Subject: Re: Problem when link has "contentid"
>>>Date: Fri, 22 Jul 2005 13:48:12 +0100
>>>
>>>I'm not sure what is making FOP think that contentID is an entity (can't 
>>>see any '&'s)
>>>but I think you should be using the 'url' function on the link.
>>>e.g.:
>>><fo:basic-link color="blue" external-destination="url({@href})">
>>>
>>>It would also be a good idea to test the XLST part outside FOP - to see 
>>>what get's produced in the FO file.
>>>
>>>Mike
>>>
>>>Fabrizio Caldas wrote:
>>
>
>
>Message Scanned by ClamAV on datalucid.com
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>

_________________________________________________________________
MSN Messenger: converse online com seus amigos .  
http://messenger.msn.com.br


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Problem when link has "contentid"

Posted by Mike Trotman <mi...@datalucid.com>.
Are you using the 'url()' function (which may provide url 
encoding/escaping)?

I'm not sure at which stage of the process the error is being thrown
- so don't know if it's a problem in the XSLT stage, or the FO=>PDF stage.

Producing an FO file from your XML (using XSLT),
inspecting the FO file
and then processing the FO file with FOP would identify which part of 
the process causes the problem.

Mike

Fabrizio Caldas wrote:

> Mike,
>
> You're right, my example link is no coherent with the one I use.
> This is a better example f the link I'm using:
> http://www.example.com/fop/test.jsp?pageType=page&contentID=1234
>
> If I switch the pageType and contentID I get a same error but with the 
> pageType:
> The reference to entity "pageType" must end with the ';' delimiter.
>
> So I guess that any link that I have with a & will have this problem.
>
> Fabrizio.
>
>> From: Mike Trotman <mi...@datalucid.com>
>> Reply-To: fop-users@xmlgraphics.apache.org
>> To: fop-users@xmlgraphics.apache.org
>> Subject: Re: Problem when link has "contentid"
>> Date: Fri, 22 Jul 2005 13:48:12 +0100
>>
>> I'm not sure what is making FOP think that contentID is an entity 
>> (can't see any '&'s)
>> but I think you should be using the 'url' function on the link.
>> e.g.:
>> <fo:basic-link color="blue" external-destination="url({@href})">
>>
>> It would also be a good idea to test the XLST part outside FOP - to 
>> see what get's produced in the FO file.
>>
>> Mike
>>
>> Fabrizio Caldas wrote:
>


Message Scanned by ClamAV on datalucid.com


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Problem when link has "contentid"

Posted by Fabrizio Caldas <fn...@hotmail.com>.
Mike,

You're right, my example link is no coherent with the one I use.
This is a better example f the link I'm using:
http://www.example.com/fop/test.jsp?pageType=page&contentID=1234

If I switch the pageType and contentID I get a same error but with the 
pageType:
The reference to entity "pageType" must end with the ';' delimiter.

So I guess that any link that I have with a & will have this problem.

Fabrizio.

>From: Mike Trotman <mi...@datalucid.com>
>Reply-To: fop-users@xmlgraphics.apache.org
>To: fop-users@xmlgraphics.apache.org
>Subject: Re: Problem when link has "contentid"
>Date: Fri, 22 Jul 2005 13:48:12 +0100
>
>I'm not sure what is making FOP think that contentID is an entity (can't 
>see any '&'s)
>but I think you should be using the 'url' function on the link.
>e.g.:
><fo:basic-link color="blue" external-destination="url({@href})">
>
>It would also be a good idea to test the XLST part outside FOP - to see 
>what get's produced in the FO file.
>
>Mike
>
>Fabrizio Caldas wrote:
>
>>Thanks Jay.
>>
>>Now my xml file is a lot easier to create.
>>I removed my <text> tags and just left it as I read it from a properties 
>>file.
>>
>><Item>
>>  Some text here <a 
>>href="http://www.example.com/fop/test.jsp?contentID=1234">please click 
>>here</a> more text here.
>></Item>
>>
>><xsl:for-each select="Item">
>>  <xsl:variable name="itemPos" select="position()"/>
>>  <fo:list-item>
>>    <fo:list-item-label end-indent="label-end()">
>>      <fo:block><xsl:value-of select="$itemPos"/></fo:block>
>>    </fo:list-item-label>
>>    <fo:list-item-body start-indent="body-start()">
>>      <fo:block>
>>        <xsl:apply-templates />
>>      </fo:block>
>>    </fo:list-item-body>
>>  </fo:list-item>
>></xsl:for-each>
>>
>><!-- =============================== -->
>><!-- child element: a                -->
>><!-- =============================== -->
>><xsl:template match="a">
>>  <fo:basic-link color="blue" external-destination="{@href}">
>>    <xsl:value-of select="."/>
>>  </fo:basic-link>
>></xsl:template>
>>
>>But I still have the "contentid" problem.
>>
>>I think that this is happening when he interprets the {@href}
>>
>>I really needed this link to have this contentid in the querystring, but I 
>>beggining to think that I may have to remove it.
>>
>>Fabrizio.
>>
>>>From: "Jay Bryant" <ja...@bryantcs.com>
>>>Reply-To: fop-users@xmlgraphics.apache.org
>>>To: <fo...@xmlgraphics.apache.org>
>>>Subject: Re: Problem when link has "contentid"
>>>Date: Thu, 21 Jul 2005 16:51:11 -0500
>>>
>>>Hi, Fabrizio,
>>>
>>>Try <xsl:value-of select="."/> rather than text(). The two are very 
>>>similar
>>>in most cases, but . tends to be more reliable because it picks up the 
>>>text
>>>value of the entire node. Also, it's more standard XSLT.
>>>
>>>Jay Bryant
>>>Bryant Communication Services
>>>
>>>----- Original Message -----
>>>From: "Fabrizio Caldas" <fn...@hotmail.com>
>>>To: <fo...@xmlgraphics.apache.org>
>>>Sent: Thursday, July 21, 2005 4:28 PM
>>>Subject: Problem when link has "contentid"
>>>
>>>
>>> > Hello,
>>> >
>>> > I have an XSLT and an XML file, which I use to generate a PDF.
>>> >
>>> > Both those files work fine except for one circumstance.
>>> >
>>> > This is an example of how I have data in the XML.
>>> > <Item>
>>> >   <text>Some text here </text>
>>> >   <a href="http://www.example.com/fop/test.jsp?contentID=1234">please
>>>click
>>> > here</a>
>>> >   <text> more text here.</text>
>>> > </Item>
>>> >
>>> > And this is the data in the XSL:
>>> > <!-- =============================== -->
>>> > <!-- child element: a                -->
>>> > <!-- =============================== -->
>>> > <xsl:template match="a">
>>> >   <fo:basic-link color="blue" external-destination="{@href}">
>>> >     <fo:inline><xsl:value-of select="text()"/></fo:inline>
>>> >   </fo:basic-link>
>>> > </xsl:template>
>>> >
>>> > When the link contains "contentID" the PDF creation generates an 
>>>error:
>>> > [ERROR] The reference to entity "contentID" must end with the ';'
>>>delimiter.
>>> > org.apache.fop.apps.FOPException: The reference to entity "contentID" 
>>>must
>>> > end with the ';'
>>> >
>>> > Does anyone know how I can make the "contentID" be interpreted as 
>>>ordinary
>>> > text and not as a reference to entity?
>>> >
>>> > Thanks in advance,
>>> >
>>> > Fabrizio.
>>> >
>>> > _________________________________________________________________
>>> > Chegou o que faltava: MSN Acesso Grátis. Instale Já!
>>> > http://www.msn.com.br/discador
>>> >
>>> >
>>> > ---------------------------------------------------------------------
>>> > To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>>> > For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>> >
>>> >
>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>>>For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>>
>>
>>_________________________________________________________________
>>MSN Messenger: converse online com seus amigos .  
>>http://messenger.msn.com.br
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>>For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>
>>
>>Message Scanned by ClamAV on datalucid.com
>>
>
>--
>Datalucid Limited
>
>
>
>Message Scanned by ClamAV on datalucid.com
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>

_________________________________________________________________
Chegou o que faltava: MSN Acesso Grátis. Instale Já! 
http://www.msn.com.br/discador


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Problem when link has "contentid"

Posted by Mike Trotman <mi...@datalucid.com>.
I'm not sure what is making FOP think that contentID is an entity (can't 
see any '&'s)
but I think you should be using the 'url' function on the link.
e.g.:
<fo:basic-link color="blue" external-destination="url({@href})">

It would also be a good idea to test the XLST part outside FOP - to see 
what get's produced in the FO file.

Mike

Fabrizio Caldas wrote:

> Thanks Jay.
>
> Now my xml file is a lot easier to create.
> I removed my <text> tags and just left it as I read it from a 
> properties file.
>
> <Item>
>  Some text here <a 
> href="http://www.example.com/fop/test.jsp?contentID=1234">please click 
> here</a> more text here.
> </Item>
>
> <xsl:for-each select="Item">
>  <xsl:variable name="itemPos" select="position()"/>
>  <fo:list-item>
>    <fo:list-item-label end-indent="label-end()">
>      <fo:block><xsl:value-of select="$itemPos"/></fo:block>
>    </fo:list-item-label>
>    <fo:list-item-body start-indent="body-start()">
>      <fo:block>
>        <xsl:apply-templates />
>      </fo:block>
>    </fo:list-item-body>
>  </fo:list-item>
> </xsl:for-each>
>
> <!-- =============================== -->
> <!-- child element: a                -->
> <!-- =============================== -->
> <xsl:template match="a">
>  <fo:basic-link color="blue" external-destination="{@href}">
>    <xsl:value-of select="."/>
>  </fo:basic-link>
> </xsl:template>
>
> But I still have the "contentid" problem.
>
> I think that this is happening when he interprets the {@href}
>
> I really needed this link to have this contentid in the querystring, 
> but I beggining to think that I may have to remove it.
>
> Fabrizio.
>
>> From: "Jay Bryant" <ja...@bryantcs.com>
>> Reply-To: fop-users@xmlgraphics.apache.org
>> To: <fo...@xmlgraphics.apache.org>
>> Subject: Re: Problem when link has "contentid"
>> Date: Thu, 21 Jul 2005 16:51:11 -0500
>>
>> Hi, Fabrizio,
>>
>> Try <xsl:value-of select="."/> rather than text(). The two are very 
>> similar
>> in most cases, but . tends to be more reliable because it picks up 
>> the text
>> value of the entire node. Also, it's more standard XSLT.
>>
>> Jay Bryant
>> Bryant Communication Services
>>
>> ----- Original Message -----
>> From: "Fabrizio Caldas" <fn...@hotmail.com>
>> To: <fo...@xmlgraphics.apache.org>
>> Sent: Thursday, July 21, 2005 4:28 PM
>> Subject: Problem when link has "contentid"
>>
>>
>> > Hello,
>> >
>> > I have an XSLT and an XML file, which I use to generate a PDF.
>> >
>> > Both those files work fine except for one circumstance.
>> >
>> > This is an example of how I have data in the XML.
>> > <Item>
>> >   <text>Some text here </text>
>> >   <a href="http://www.example.com/fop/test.jsp?contentID=1234">please
>> click
>> > here</a>
>> >   <text> more text here.</text>
>> > </Item>
>> >
>> > And this is the data in the XSL:
>> > <!-- =============================== -->
>> > <!-- child element: a                -->
>> > <!-- =============================== -->
>> > <xsl:template match="a">
>> >   <fo:basic-link color="blue" external-destination="{@href}">
>> >     <fo:inline><xsl:value-of select="text()"/></fo:inline>
>> >   </fo:basic-link>
>> > </xsl:template>
>> >
>> > When the link contains "contentID" the PDF creation generates an 
>> error:
>> > [ERROR] The reference to entity "contentID" must end with the ';'
>> delimiter.
>> > org.apache.fop.apps.FOPException: The reference to entity 
>> "contentID" must
>> > end with the ';'
>> >
>> > Does anyone know how I can make the "contentID" be interpreted as 
>> ordinary
>> > text and not as a reference to entity?
>> >
>> > Thanks in advance,
>> >
>> > Fabrizio.
>> >
>> > _________________________________________________________________
>> > Chegou o que faltava: MSN Acesso Grátis. Instale Já!
>> > http://www.msn.com.br/discador
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>> > For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>> >
>> >
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>
>
> _________________________________________________________________
> MSN Messenger: converse online com seus amigos .  
> http://messenger.msn.com.br
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
> Message Scanned by ClamAV on datalucid.com
>

-- 
Datalucid Limited



Message Scanned by ClamAV on datalucid.com


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Problem when link has "contentid"

Posted by Fabrizio Caldas <fn...@hotmail.com>.
Thanks Jay.

Now my xml file is a lot easier to create.
I removed my <text> tags and just left it as I read it from a properties 
file.

<Item>
  Some text here <a 
href="http://www.example.com/fop/test.jsp?contentID=1234">please click 
here</a> more text here.
</Item>

<xsl:for-each select="Item">
  <xsl:variable name="itemPos" select="position()"/>
  <fo:list-item>
    <fo:list-item-label end-indent="label-end()">
      <fo:block><xsl:value-of select="$itemPos"/></fo:block>
    </fo:list-item-label>
    <fo:list-item-body start-indent="body-start()">
      <fo:block>
        <xsl:apply-templates />
      </fo:block>
    </fo:list-item-body>
  </fo:list-item>
</xsl:for-each>

<!-- =============================== -->
<!-- child element: a                -->
<!-- =============================== -->
<xsl:template match="a">
  <fo:basic-link color="blue" external-destination="{@href}">
    <xsl:value-of select="."/>
  </fo:basic-link>
</xsl:template>

But I still have the "contentid" problem.

I think that this is happening when he interprets the {@href}

I really needed this link to have this contentid in the querystring, but I 
beggining to think that I may have to remove it.

Fabrizio.

>From: "Jay Bryant" <ja...@bryantcs.com>
>Reply-To: fop-users@xmlgraphics.apache.org
>To: <fo...@xmlgraphics.apache.org>
>Subject: Re: Problem when link has "contentid"
>Date: Thu, 21 Jul 2005 16:51:11 -0500
>
>Hi, Fabrizio,
>
>Try <xsl:value-of select="."/> rather than text(). The two are very similar
>in most cases, but . tends to be more reliable because it picks up the text
>value of the entire node. Also, it's more standard XSLT.
>
>Jay Bryant
>Bryant Communication Services
>
>----- Original Message -----
>From: "Fabrizio Caldas" <fn...@hotmail.com>
>To: <fo...@xmlgraphics.apache.org>
>Sent: Thursday, July 21, 2005 4:28 PM
>Subject: Problem when link has "contentid"
>
>
> > Hello,
> >
> > I have an XSLT and an XML file, which I use to generate a PDF.
> >
> > Both those files work fine except for one circumstance.
> >
> > This is an example of how I have data in the XML.
> > <Item>
> >   <text>Some text here </text>
> >   <a href="http://www.example.com/fop/test.jsp?contentID=1234">please
>click
> > here</a>
> >   <text> more text here.</text>
> > </Item>
> >
> > And this is the data in the XSL:
> > <!-- =============================== -->
> > <!-- child element: a                -->
> > <!-- =============================== -->
> > <xsl:template match="a">
> >   <fo:basic-link color="blue" external-destination="{@href}">
> >     <fo:inline><xsl:value-of select="text()"/></fo:inline>
> >   </fo:basic-link>
> > </xsl:template>
> >
> > When the link contains "contentID" the PDF creation generates an error:
> > [ERROR] The reference to entity "contentID" must end with the ';'
>delimiter.
> > org.apache.fop.apps.FOPException: The reference to entity "contentID" 
>must
> > end with the ';'
> >
> > Does anyone know how I can make the "contentID" be interpreted as 
>ordinary
> > text and not as a reference to entity?
> >
> > Thanks in advance,
> >
> > Fabrizio.
> >
> > _________________________________________________________________
> > Chegou o que faltava: MSN Acesso Grátis. Instale Já!
> > http://www.msn.com.br/discador
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> >
> >
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>

_________________________________________________________________
MSN Messenger: converse online com seus amigos .  
http://messenger.msn.com.br


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Problem when link has "contentid"

Posted by Jay Bryant <ja...@bryantcs.com>.
Hi, Fabrizio,

Try <xsl:value-of select="."/> rather than text(). The two are very similar
in most cases, but . tends to be more reliable because it picks up the text
value of the entire node. Also, it's more standard XSLT.

Jay Bryant
Bryant Communication Services

----- Original Message ----- 
From: "Fabrizio Caldas" <fn...@hotmail.com>
To: <fo...@xmlgraphics.apache.org>
Sent: Thursday, July 21, 2005 4:28 PM
Subject: Problem when link has "contentid"


> Hello,
>
> I have an XSLT and an XML file, which I use to generate a PDF.
>
> Both those files work fine except for one circumstance.
>
> This is an example of how I have data in the XML.
> <Item>
>   <text>Some text here </text>
>   <a href="http://www.example.com/fop/test.jsp?contentID=1234">please
click
> here</a>
>   <text> more text here.</text>
> </Item>
>
> And this is the data in the XSL:
> <!-- =============================== -->
> <!-- child element: a                -->
> <!-- =============================== -->
> <xsl:template match="a">
>   <fo:basic-link color="blue" external-destination="{@href}">
>     <fo:inline><xsl:value-of select="text()"/></fo:inline>
>   </fo:basic-link>
> </xsl:template>
>
> When the link contains "contentID" the PDF creation generates an error:
> [ERROR] The reference to entity "contentID" must end with the ';'
delimiter.
> org.apache.fop.apps.FOPException: The reference to entity "contentID" must
> end with the ';'
>
> Does anyone know how I can make the "contentID" be interpreted as ordinary
> text and not as a reference to entity?
>
> Thanks in advance,
>
> Fabrizio.
>
> _________________________________________________________________
> Chegou o que faltava: MSN Acesso Grátis. Instale Já!
> http://www.msn.com.br/discador
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org