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

RE: Implementing a (fairly) complex business rule

Subject: RE: Implementing a (fairly) complex business rule
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Tue, 30 Sep 2008 12:10:36 -0400
RE:  Implementing a (fairly) complex business rule
At 11:28 AM 9/30/2008, Mike wrote:
A special case is what one might call "abnormal mixed content", where the
structure is that of mixed content but the semantics are unorthodox: for
example

 <date>2008-09-30
  <source>estimated</source>
  <calendar>Gregorian</calendar>
 </date>

(It would be more usual to use attributes here rather than child elements;
but one also sees comments used.) In such a case you may need to find the
text node (or all the text nodes) explicitly using path expressions.

This is also a good example of what you have to do when dealing with data whose design is, shall we say, "suboptimal".


XSLT, especially XSLT 1.0, is at its best when the incoming data is well designed. When it isn't, one has to call on more advanced techniques such as processing text nodes explicitly. Of course, XSLT also exerts a gravitational pull on XML semantics, such that well-designed XML comes to be the XML that XSLT can handle without fuss.

Cheers,
Wendell



======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================

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-2007 All Rights Reserved.