> 1. When i have a <br/> as a part of my xsl it gets
> transformed to a <br>

Required behavior when the output mode is HTML. It shouldn't happen when
the output mode is XML; XML requires that all tags be explicitly closed.


> 2. When i have a <script></script> as a part of my xsl
> it gets transformed as <script/>.

That *shouldn't* be happening when the output mode is HTML, but should
happen when the output mode is XML. XML considers those two forms
completely equivalent.

So if you're really seeing both the above behaviors as output of a single
transformation, I'm more than a little surprised.


>3. It seems like having a CDATA section directly as a
>part of the xsl file does not work. whereas having it
>as a part of <xsl:text> </xsl:text> works fine..

I'm not sure what you mean by "does not work". If you mean that it's output
as text rather than as a CDATA Section: that's normal XSLT behavior. CDATA
sections are fully expanded as they're read in, then output using the
stylesheet's normal rules for that element type. To set those rules see the
cdata-section-elements parameter of xsl:output.


>4. What is the best way to override special characters
>that come as a part of the xsl file??

I'm not sure what you mean by "override". If the characters are there and
are legal XML characters, they will be processed. XML serialization will
either output them directly (if the output document's encoding supports
them), or represent them as numeric character references, or (if
cdata-section-elements applies) generate <![CDATA[]]> markup. If you want
to discard them, or replace them with something else, you have to write the
stylesheet logic to do the appropriate string manipulation.



______________________________________
Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more.
"The world changed profoundly and unpredictably the day Tim Berners Lee
got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk

Reply via email to