Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XALANC-435

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XALANC-435
    Summary: omit-xml-declaration requires indent="yes" to behave as expected
       Type: Bug

     Status: Unassigned
   Priority: Trivial

    Project: XalanC
 Components: 
             XalanC
   Versions:
             1.8

   Assignee: 
   Reporter: Sean Warden

    Created: Mon, 20 Sep 2004 4:02 PM
    Updated: Mon, 20 Sep 2004 4:02 PM
Environment: RedHat 9 with full patches (including all Progeny updates), kernel 
2.4.20, i686, Xerces 2.5.0.

Description:
(Examples taken from O'Reilly's _Learning XSLT_ by Michael Fitzgerald, which is how I 
discovered the bug.)

Here is escape.xml:
-- cut --
<title>O'Reilly</title>
-- cut --

Here is escape.xsl:
-- cut --
<stylesheet version="1.0" xmlns="http://www.w3.org/1999/XSL/Transform";>
<output method="xml" omit-xml-declaration="yes"/>

<template match="/">
 <publisher xmlns="">
  <value-of select="title" xmlns="http://www.w3.org/1999/XSL/Transform"/>
  <text disable-output-escaping="yes" xmlns="http://www.w3.org/1999/XSL/Transform";> 
&amp; Associates</text>
 </publisher>
</template>

</stylesheet>
-- cut --

'xalan escape.xml escape.xsl' gives:

<?xml version="1.0" encoding="UTF-8"?><publisher>O'Reilly & Associates</publisher>

The stylesheet explicitly states 'omit-xml-declaration', but it is printed anyway.  
One way I found to achieve expected behavior is to change the output element of 
escape.xsl to read:

<output method="xml" indent="yes" omit-xml-declaration="yes"/>

A trivial issue, to be sure, but it may be a side-effect of some other flaw.


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to