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

RE: XML apparently cannot be used for general text mar

Subject: RE: XML apparently cannot be used for general text markup: whitespace gripe
From: "Hunsberger, Peter" <Peter.Hunsberger@xxxxxxxxxx>
Date: Tue, 19 Mar 2002 08:50:20 -0600
RE:  XML apparently cannot be used for general text mar
Andrew,

Thanks for raising the issue, it's helped me formulate what will be my
generalized architectural approach to the issue:

> 1- Is there a concensus on this issue?  Is it really a problem?
> 

I don't know about any consensus on the issue, but personally, I do not
think it is a problem:  If you're doing client side XSLT then you know
you've also got CSS support and it's much better to use CSS for precise
control of element placement than any dependency on spacing.  If you have to
do generic HTML on the server side it's more of a pain, since you can't
really depend on CSS.  However, you're then in a position to pipeline the
content or use other techniques to get some kind of sensible XML structure
that can in turn be rendered in whatever form you really need.  For me this
usually means lots of (sometimes tricky) table structures, alternatively I
sometimes resort to pumping out variable numbers of &#160;  In either case,
you can control what shows up on the client side.

> 2- From an xsl processing perspective, is text node processing (such as
> text()[1]) equivalent to normal element processing?

One would hope that you don't normally have such badly formed XML that
you've got to resort to this on a regular basis?  If you do, a two pass
approach would seem recommended...

> 3 - Should this problem be dealt with at xml level, or should it not
matter
> to the xsl developer?

If you're doing HTML with CSS then it need not matter to the XSL developer.
If you're doing generic HTML and you don't want it to matter to *every* XML
developer then, again, do a two pass transformation: first to generic XHTML,
then to precisely formatted HTML.  Unfortunately, in the latter case,
someone at the XML level still has to worry about it...

As I've watched this forum I've noticed a lot of questions on how to get
precise HTML output (e.g.. &nbsp; ad nauseam).  I think somehow the
community needs more emphasis on how to do XML to HTML with CSS and on how
to do XML --> XHTML --> HTML.  It's probably something that should be
emphasized in the books and FAQs?  

 

 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.