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

Re: Fixing <b>

Subject: Re: Fixing <b>
From: Mike Brown <mike@xxxxxxxx>
Date: Wed, 27 Mar 2002 20:01:44 -0700 (MST)
xslt lt
Lea Allison wrote:
> Very helpful Mike.

tammy@xxxxxxxx wrote:
> Great thanks!  I should have made it clear that I had no control about the
> crappy data I was being given.  I work in an environment where XSLT isn't
> respected, because it's not well understood, IMO.  Now I'm being asked if XSLT
> can deal with THIS situation. 
> 
> I appreciate your insight! It's extremely helpful.

There was some discussion recently on this topic, on xml-dev. It was said that
people who ask questions here often just want immediate solutions, no matter
how poor the code, not to be taught how to fish. "Just tell me what to type to
make it work; your lectures are boring!" was the example one person gave. But
as the other responses besides my own (from Michael Kay and naha@xxxxxxxxxx)
indicate, there is not much sympathy for this sentiment around here ... at
least not among those of us who value writing good code to work with good
data, and who don't want to be caught telling people how to write bad code to
work with bad data.

What I'm saying is that everyone is hesitant to tell you how to make it work
in XSLT because you're banging on a nail with a wrench. You either need a
hammer instead of a wrench, or a nut & bolt instead of a nail. And I wasn't
exagerrating, it really is a FAQ -- check http://www.dpawson.co.uk/. The
standard response really is to either goad the people responsible for the
crappy data into fixing it, or to not use XSLT, because trying to work with
this kind of data in XSLT, in the way that you want to do it, while not
impossible, requires using a much despised feature (disable-output-escaping)
that undermines the language's principle of being something meant to work with
trees, rather than being a general text processing tool.

If I were you, and if it's easy to spot the ugly data (like if it's always in
a 'p' element), I would fix it using, say, a SAX filter, so I could apply my
XSLT to something a bit easier to deal with. If the transformation is trivial,
I might skip using XSLT altogether.

   - Mike
____________________________________________________________________________
  mike j. brown                   |  xml/xslt: http://skew.org/xml/
  denver/boulder, colorado, usa   |  resume: http://skew.org/~mike/resume/

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


Current Thread
  • RE: Fixing &amp;lt;b&amp;gt;, (continued)
    • Michael Kay - Wed, 27 Mar 2002 04:10:26 -0500 (EST)
    • Lea Allison - Wed, 27 Mar 2002 01:12:29 -0500 (EST)
    • tammy - Wed, 27 Mar 2002 06:44:48 -0500 (EST)
      • naha - Wed, 27 Mar 2002 09:08:55 -0500 (EST)
      • Mike Brown - Wed, 27 Mar 2002 21:56:59 -0500 (EST) <=
        • Michael Kay - Thu, 28 Mar 2002 03:50:25 -0500 (EST)
        • naha - Thu, 28 Mar 2002 08:54:20 -0500 (EST)
        • David Carlisle - Thu, 28 Mar 2002 13:59:46 -0500 (EST)
        • Mike Brown - Sun, 31 Mar 2002 23:25:12 -0500 (EST)

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.