You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Johan Nagels <jo...@student.kuleuven.ac.be> on 2000/10/13 16:28:20 UTC

xml:space bug?

Hi,

As last-year student Computer Sciences at the Catholic University of Louvain
(KULeuven) I'm working on a software package that uses the Xalan (for Java)
for XML (and RDF) processing.

Now my question:
When I run the following code:

<CODE>
  try
  {
   XSLTProcessor processor = XSLTProcessorFactory.getProcessor();
   processor.process(new XSLTInputSource(new FileReader(file)),
                    new XSLTInputSource("dc-extract.xsl"),
                    new XSLTResultTarget(System.out));
  }
  catch(SAXException e)
  {
   System.out.println("########################" + e);
   throw new UnsupportedFileFormatException();
  }
</CODE>

With as file an XHTML file with the following contents:

<CODE>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head profile="http://purl.org/metadata/dublin_core">
    <title>Virtual Library</title>
    <meta name="DC.Creator" content="Johan Nagels" />
    <meta name="DC.Title" content="XHTML met Dublin Core RDF Metadata"
lang="en" />
    <meta name="DC.Subject" content="XHTML met Dublin Core RDF Metadata"
lang="en" />
  </head>
  <body>
    <p>Moved to <a href="http://vlib.org/">vlib.org</a>.</p>
  </body>
</html>
</CODE>

I get:
<CODE>
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; Line 343; Column 47
XSL Error: Could not parse Input XML document!
XSL Error: SAX Exception
########################org.apache.xalan.xslt.XSLProcessorException: The
attribu
te declaration for "xml:space" must be given as an enumerated type whose
only po
ssible values are "default" and "preserve".
</CODE>

So, is this a bug in Xalan? And if so, is there a work around?

Greetings,
    Johan Nagels