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

output method: all or none. (was Re: HTML output method: out

Subject: output method: all or none. (was Re: HTML output method: output a & character?)
From: "Nikita Ogievetsky" <nogievet@xxxxxxxxxxxx>
Date: Tue, 26 Oct 1999 08:16:29 +0100
methods of output
David Carlisle:
>Nikita Ogievetsky:
> >The other funny thing about html method is that XSLT parser generates a
semi
> >valid document that it can not read back.
> >Seems to me that if there are fancy output methods there are should
> >corresponding fancy input methods.
> > (i.e. XSLT parser should be able to read HTML document if it was
produced by
> > another conformant XSLT parser.)
> I don't see how that could be possible in general. The result tree can be
> linearised in any way the application can provide. HTML, text, sound,
> ... Some of these forms may not be too suitable for being read back in.
> In the case of HTML it ought to be possible, all you need to do is find
> an HTML (rather than XML) parser that will present a SAX interface to the
> XSL engine.
This is good for general HTML.
But for documents (quasi-HTML) produced with XSLT transformation a much
simpler solution will work:
Send HTML document through a filter prior to parsing it with XML parser.
Filter should:
1) expand Boolean attributes : replace <option selected/> with <option
selected="selected"/>
2) escape characters within <script> and  <style> tags and "&{" combination
in attribute values
3) add end tags to empty elements: change <br>,<hr>, etc into <br/>, <hr/>
etc.
    ( Why was there a need to do the opposite: most HTML browsers have no
problems reading empty elements with end tags. Are we saving characters
here?)

Are we missing DHTML output method that would live unescaped onEvent ( event
handler ) attributes? :)
Some problems should also be in CSS style attributes... (other then &{)

Once started moving this way should we finish?
Although I would have been happy having just xml output and homemade regular
expressions on top of it.
>Roll on xhtml, save us from this madness!
I agree with you, but afraid it will be a long weight...

Nikita Ogievetsky
http://www.cogx.com


 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.