> Guoliang --
>
> I'm not sure what you mean here. When you say "use a customized SAX
> parser" are you talking about a ContentHandler? If so, I expect that
> you can emit some type of text or element that wouldn't normally appear
> and then set a flag in your ContentHandler so that any new input would
You are right. However, I don't think I'll do this, because there's not
much work to do when each method is invoked. If I add code to check the
element's name, set and check that flag in each method call, it doesn't
help to gain better performance. Anyway, Thank you very much for
pointing out this.
>
> be ignored (or treated as CDATA) until the ending signal occurs.
>
> Is this what you want to do?
>
> Gary
>
> Guoliang Cao wrote:
>
>> Thanks Gary,
>>
>> I saw your comments. You are right. So I'm looking for a solution for
>> this question -
>>
>> I set transformation result as a SAXResult and use a customized SAX
>> parser to parse the result. To achieve a better performance, I want the
>> SAX parser to skip parsing some elements and treat them as a cdata
>> section. What I did is using <xsl:value-of
>> disable-output-escaping="yes" select="<![CDATA["/> and <xsl:value-of
>> disable-output-escaping="yes" select="]]>"/> to encapsulate that
>> section. Then I expect the SAXParser will find the <![CDATA[ and not
>> parse the following elements until met the closing ]]>. However, it
>> seems this is not achievable. Only after I serialize the output, I can
>> let a SAX parser to treat that section as a cdata. Am I correct here?
>> Any ideas?
>>
>> Guoliang
>>
>> --- a sample of xsl -------------------
>>
>> <xsl:value-of disable-output-escaping="yes" select="<![CDATA["/>
>> <xsl:copy-of select="a"/>
>> <xsl:value-of disable-output-escaping="yes" select="]]>"/>
>>
>> --- expected output -------------------
>>
>> <![CDATA[<a>....</a>]]>
>> <a>...</a> will be treated as a text node and not be parsed by SAX parser.
>> ----------------------------------------
>>
>>> I have updated bugzilla. Basically, Xalan is working as designed. See
>>> the comments in bugzilla and the javadoc for the Result interface.
>>>
>>> Gary
>>>
>>> Guoliang Cao wrote:
>>>
>>>> I reported it two months ago. It's still in NEW status. If it can't be
>>>> fixed, I have to change my code to avoid using SAXResult. I really
>>>> don't like to do that.
>>>>
>>>> Sincerely,
>>>>
>>>> Guoliang
>>>