[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: getting xsl to produce ill-formed xml?

Subject: Re: getting xsl to produce ill-formed xml?
From: "Mark D. Anderson" <mda@xxxxxxxxxxxxxx>
Date: Sun, 21 Mar 1999 09:43:11 -0800
produce entity in xml
I got several suggestions for this problem:

1. (John Simpson) Generate a CDATA block.
I don't see how this can be done (Oren seems to confirm this
in his <Opinion> element).

2. (Duane Nickul) Post-process with perl.
But that is what I was already doing.
It is the principle of the thing. If I was going to be using
perl, this little exercise would have been done long ago.
I wanted an excuse to play with xsl.

3. (Oren Ben-Kiki) Use <SCRIPT>.
This works, but now I don't get the exact output I wanted --
I've got this "# <SCRIPT>" in the perl program itself.
It is like letting xsl win; not acceptable :).
(Again, I've already got a working system... a reasonable
definition of a hacker is someone who takes a working
system and "improves" it....)

4. (Duane Nickul) Use an entity.
This almost works. If I put this in my style sheet:
<!DOCTYPE xsl:stylesheet SYSTEM "xsl.dtd" [ 
<!ENTITY plarrow "=>"> 
]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> 
...
<xsl:text>
&lt; 
&plarrow; 
</xsl:text>

Then I get this in the output:
&lt;
=&gt;

I might note that this also holds if I use this stylesheet
declaration:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl" 
        xmlns:html="http://www.w3.org/TR/REC-html40" 
        result-ns="html"> 
In other words, I can't seem to get xt to expand all entities
I insert (like "&lt;"), and worse yet, it seems to want to
convert any ">" in sight to a "&gt;".

I don't know if this is an xsl thing or an xt thing.

(In general, I've yet to find that xt does much different
based on the stylesheet declaration except maybe put a line like
this across the top of the output:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
.)

-mda




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.