[jdom-interest] Problem with XSL Trasnformation - Possible bug

Miguel Angel Medina Lopez mamedina at logic-factory.com
Mon Jul 2 01:44:29 PDT 2001


Hi:

I have detected why occur the exception and I think it maybe a bug. The
problem is the table attribute width="100%, the parser seem to detect a DTD
declaration in the character '%'.
This code doesn't work
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE xsl:stylesheet[
  <!ENTITY nbsp "&#160;">
 ]>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="LOGICMART">

<html>
<head>
<title>Gesti&#243;n de Plantillas</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
</head>
<body bgcolor="#FFFFFF" text="#000000">
 <table width="100%">
   <tr>
     <td>Una columna</td>
   </tr>
 </table>
</body>
</html>

</xsl:template>
</xsl:stylesheet>

and the next exception is thrown:
org.jdom.JDOMException: XSLT Transformation failed: Parameter entity
references must not appear within markup declarations in the internal DTD
subset.

If I quit the character '%' from the width attribute it works,and if I quit
all the Doctype declaration it works too. Other situation that work is to
declare the entities in a external file.

Is this a bug? Have I write it bad?

Thank You

----- Original Message -----
From: "Benjamin Kopic" <ben at kopic.org>
To: <mamedina at logic-factory.com>; <jdom-interest at jdom.org>
Sent: Wednesday, July 25, 2001 8:24 PM
Subject: Re: [jdom-interest] Problem with XSL Trasnformation


> just out of interest, the lines you delete, do they contain &aacute;? You
> declare aacute twice.
>
> Miguel Angel Medina Lopez wrote on 24/7/01 12:11:
> >Hi:
> >
> >I'm working with JDOM beta7
> >and use it to transform my
> >XML documents. The
> >problem is that if I define
> >entities in the XSL document
> >the next exception is
> >thrown:
> >
> >
> >org.jdom.JDOMException:
> >XSLT Transformation failed:
> >Parameter entity
> >references must not appear
> >within markup declarations
> >in the internal DTD  subset.
> >
> >An I define the entities with
> >the next code:
> >
> ><!DOCTYPE xsl:stylesheet[
> >  <!ENTITY nbsp "&#160;">
> >  <!ENTITY copy "&#169;">
> >  <!ENTITY aacute
> >"&#225;">
> >  <!ENTITY eacute
> >"&#233;">
> >  <!ENTITY iacute "&#237;">
> >  <!ENTITY oacute
> >"&#243;">
> >  <!ENTITY aacute
> >"&#250;">
> > ]>
> >
> >The error is very strange
> >because if I delete some lines
> >form the XSL document the
> >entities works fine.
> >
> >Can somebody help me.
> >
> >-----------------------------
> >-----------------------------
> >--- Miguel Ángel Medina
> >López
> >Logic Factory:
> >www.logic-factory.com
> >Granada - España
> >
> >
> >
> >_____________________________
> >__________________ To control
> >your jdom-interest
> >membership:
> >http://lists.denveronline.net
> >/mailman/options/jdom-int
> >erest/youraddr at yourhost.c
> >om
>
>




More information about the jdom-interest mailing list