You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Sc...@lotus.com on 2001/01/05 19:25:59 UTC

Re: .., indent, html formatting

> 1. The following xsl construct
> <xsl:text disable-output-escaping="yes">
> <!CDATA[[ <, >, &, ', " ]]>
> </xsl:text>
> should not escape the CDATA charachters, as mentioned in XSL spec
> but xalan seems to escape it no matter what the
> disable-output-escaping attribute is set to i.e. "yes" or "no"

This is a surprise to me.  Dave, we have a test for this exact case, right?
Ashwin, can you send a small replication of the bug.

> 2. <xsl:output method="xml" indent="yes"/>
> This is supposed to format the output with proper indenting but this
> too does not seem to work.

This works.  "indent" in XSLT just says that the result will be
pretty-printed.  It does not normally add extra spaces to the line breaks,
though you can set it to do so via the API.

> 3. For some reason xalan does not seem to complete
> certain "html" elements even though the output method is
> set to xml in the stylesheet.
> i.e.
> <img src="hello.gif width="10" height="32"/>
> after transformation becomes
> <img src="hello.gif width="10" height="32">

The input does not look like valid XML, and should not parse, so I don't
understand.  In fact it doesn't parse with Xerces 1.2.3.  If I add the
quote after hello.gif where I think it's supposed to go, it should come out
fine.

-scott




                                                                                                                   
                    "Ashwin                                                                                        
                    Agate"               To:     <xa...@xml.apache.org>                                        
                    <aagate@ind2i        cc:     (bcc: Scott Boag/CAM/Lotus)                                       
                    nd.com>              Subject:     <xsl:text disable-output-escaping="yes">..</xsl:text>,       
                                         indent, html formatting                                                   
                    01/05/01                                                                                       
                    01:24 PM                                                                                       
                    Please                                                                                         
                    respond to                                                                                     
                    xalan-dev                                                                                      
                                                                                                                   
                                                                                                                   




Hi all,

We recently started using xalan 1.2.2 and have some questions

1. The following xsl construct
<xsl:text disable-output-escaping="yes">
<!CDATA[[ <, >, &, ', " ]]>
</xsl:text>
should not escape the CDATA charachters, as mentioned in XSL spec
but xalan seems to escape it no matter what the
disable-output-escaping attribute is set to i.e. "yes" or "no"

2. <xsl:output method="xml" indent="yes"/>
This is supposed to format the output with proper indenting but this
too does not seem to work.

same is with "meta" elements

Is there any way we can set Xalan to output valid XML ?



I would appreciate if anybody can send me any information/pointers..

Thanks,
Ashwin






RE: .., indent, html formatting

Posted by Ashwin Agate <aa...@ind2ind.com>.
Hi Scott,
May be I spoke too soon but

I still could not resolve the
<xsl:text disable-output-escaping="yes">
 <![CDATA[ & , <, > , &amp;, ' , " ,charachters]]>
</xsl:text>
problem.

Though when I run the transform through the command line
that is calling

java org.apache.xalan.xslt.Process -IN test.xml -XSL test.xsl -OUT out.xml

it works well but when I try to use the Java API to
get a XSLTProcessor object , and do the transform, for some reason it
does'nt work.

Here is the stylesheet

XSL:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="xml" indent="yes"/>
  <xsl:template match="/">
    <example>
      <charachters>
	<xsl:text disable-output-escaping="yes"><![CDATA[ <, >, &, &amp;, ',
" ]]></xsl:text>
      </charachters>
    </example>
  </xsl:template>
</xsl:stylesheet>

Output I get is

<example>
  <charachters>
    &lt; , &gt; , &amp; &amp;amp;, ', "
  </charachters>
</example>

I know this could be a simple configuration problem
and would appreciate if you could send me any pointers...
Thanks,
Ashwin





-----Original Message-----
From: Ashwin Agate [mailto:aagate@ind2ind.com]
Sent: Friday, January 05, 2001 5:21 PM
To: Scott_Boag@lotus.com
Cc: xalan-dev@xml.apache.org
Subject: RE: <xsl:text disable-output-escaping="yes">..</xsl:text>,
indent, html formatting


Hi Scott,
Thanks for your quick response....
I found the problem of all the three issues
mentioned below ..namely "me not reading the documentation
well enough.."
well as they say "If everything fails read the manual....!!!"
Thanks a bunch,
Ashwin


-----Original Message-----
From: Scott_Boag@lotus.com [mailto:Scott_Boag@lotus.com]
Sent: Friday, January 05, 2001 10:26 AM
To: xalan-dev@xml.apache.org
Subject: Re: <xsl:text disable-output-escaping="yes">..</xsl:text>,
indent, html formatting



> 1. The following xsl construct
> <xsl:text disable-output-escaping="yes">
> <!CDATA[[ <, >, &, ', " ]]>
> </xsl:text>
> should not escape the CDATA charachters, as mentioned in XSL spec
> but xalan seems to escape it no matter what the
> disable-output-escaping attribute is set to i.e. "yes" or "no"

This is a surprise to me.  Dave, we have a test for this exact case, right?
Ashwin, can you send a small replication of the bug.

> 2. <xsl:output method="xml" indent="yes"/>
> This is supposed to format the output with proper indenting but this
> too does not seem to work.

This works.  "indent" in XSLT just says that the result will be
pretty-printed.  It does not normally add extra spaces to the line breaks,
though you can set it to do so via the API.

> 3. For some reason xalan does not seem to complete
> certain "html" elements even though the output method is
> set to xml in the stylesheet.
> i.e.
> <img src="hello.gif width="10" height="32"/>
> after transformation becomes
> <img src="hello.gif width="10" height="32">

The input does not look like valid XML, and should not parse, so I don't
understand.  In fact it doesn't parse with Xerces 1.2.3.  If I add the
quote after hello.gif where I think it's supposed to go, it should come out
fine.

-scott





                    "Ashwin
                    Agate"               To:     <xa...@xml.apache.org>
                    <aagate@ind2i        cc:     (bcc: Scott Boag/CAM/Lotus)
                    nd.com>              Subject:     <xsl:text
disable-output-escaping="yes">..</xsl:text>,
                                         indent, html formatting
                    01/05/01
                    01:24 PM
                    Please
                    respond to
                    xalan-dev






Hi all,

We recently started using xalan 1.2.2 and have some questions

1. The following xsl construct
<xsl:text disable-output-escaping="yes">
<!CDATA[[ <, >, &, ', " ]]>
</xsl:text>
should not escape the CDATA charachters, as mentioned in XSL spec
but xalan seems to escape it no matter what the
disable-output-escaping attribute is set to i.e. "yes" or "no"

2. <xsl:output method="xml" indent="yes"/>
This is supposed to format the output with proper indenting but this
too does not seem to work.

same is with "meta" elements

Is there any way we can set Xalan to output valid XML ?



I would appreciate if anybody can send me any information/pointers..

Thanks,
Ashwin








RE: .., indent, html formatting

Posted by Ashwin Agate <aa...@ind2ind.com>.
Hi Scott,
Thanks for your quick response....
I found the problem of all the three issues
mentioned below ..namely "me not reading the documentation
well enough.."
well as they say "If everything fails read the manual....!!!"
Thanks a bunch,
Ashwin


-----Original Message-----
From: Scott_Boag@lotus.com [mailto:Scott_Boag@lotus.com]
Sent: Friday, January 05, 2001 10:26 AM
To: xalan-dev@xml.apache.org
Subject: Re: <xsl:text disable-output-escaping="yes">..</xsl:text>,
indent, html formatting



> 1. The following xsl construct
> <xsl:text disable-output-escaping="yes">
> <!CDATA[[ <, >, &, ', " ]]>
> </xsl:text>
> should not escape the CDATA charachters, as mentioned in XSL spec
> but xalan seems to escape it no matter what the
> disable-output-escaping attribute is set to i.e. "yes" or "no"

This is a surprise to me.  Dave, we have a test for this exact case, right?
Ashwin, can you send a small replication of the bug.

> 2. <xsl:output method="xml" indent="yes"/>
> This is supposed to format the output with proper indenting but this
> too does not seem to work.

This works.  "indent" in XSLT just says that the result will be
pretty-printed.  It does not normally add extra spaces to the line breaks,
though you can set it to do so via the API.

> 3. For some reason xalan does not seem to complete
> certain "html" elements even though the output method is
> set to xml in the stylesheet.
> i.e.
> <img src="hello.gif width="10" height="32"/>
> after transformation becomes
> <img src="hello.gif width="10" height="32">

The input does not look like valid XML, and should not parse, so I don't
understand.  In fact it doesn't parse with Xerces 1.2.3.  If I add the
quote after hello.gif where I think it's supposed to go, it should come out
fine.

-scott





                    "Ashwin
                    Agate"               To:     <xa...@xml.apache.org>
                    <aagate@ind2i        cc:     (bcc: Scott Boag/CAM/Lotus)
                    nd.com>              Subject:     <xsl:text
disable-output-escaping="yes">..</xsl:text>,
                                         indent, html formatting
                    01/05/01
                    01:24 PM
                    Please
                    respond to
                    xalan-dev






Hi all,

We recently started using xalan 1.2.2 and have some questions

1. The following xsl construct
<xsl:text disable-output-escaping="yes">
<!CDATA[[ <, >, &, ', " ]]>
</xsl:text>
should not escape the CDATA charachters, as mentioned in XSL spec
but xalan seems to escape it no matter what the
disable-output-escaping attribute is set to i.e. "yes" or "no"

2. <xsl:output method="xml" indent="yes"/>
This is supposed to format the output with proper indenting but this
too does not seem to work.

same is with "meta" elements

Is there any way we can set Xalan to output valid XML ?



I would appreciate if anybody can send me any information/pointers..

Thanks,
Ashwin