Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

xml prolog

 
Zhining Zhang
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,
I got
==============
<?xml version="1.0" encoding="UTF-8"?>
<H1>XSL</H1><H2>John Smith22</H2>
==============
from
xml file
===============
<?xml version="1.0"?>
<xslTutorial >
<title>XSL</title>
<author>John Smith</author>
</xslTutorial>
==================
and xsl file
==================
<?xml version="1.0"?>
<xslTutorial >
<title>XSL</title>
<author>John Smith</author>
</xslTutorial>
==================
Where the xml prolog line come from?
Can I delete it?
I am using JAXP. thanks!
-Zhining Zhang
 
David Peterson
author
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try including this line near the top of your XSL stylesheet...
<xslutput method="html">
David

[This message has been edited by David Peterson (edited November 29, 2001).]
 
Zhining Zhang
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello, David,
after add the line. I got error message like
======================
** Transformer Factory error
javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: java.lang.NullPointerException
javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: java.lang.NullPointerException
at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:815)
at org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:635)
at zzxmlxsl.showme.transformXMLXSL(showme.java:100)

============================
-Zhining Zhang
 
Zhining Zhang
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

David, Thanks so much! It works now.
the xsl file likes
===========
<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' >
<xsl utput method="html"/>
...
=========================
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic