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

Re: XSLT Hello World - outreach

Subject: Re: XSLT Hello World - outreach
From: Brian Chrisman <brchrisman@xxxxxxxxx>
Date: Fri, 28 Mar 2014 14:02:40 -0700
Re:  XSLT Hello World - outreach
On Fri, Mar 28, 2014 at 11:03 AM, Rick Quatro <rick@xxxxxxxxxxxxxx> wrote:
> I think XSLT is difficult for "traditional" programmers because the basic
rules of functional programming are not familiar to them, or they are not even
aware of them. In some cases, it is easier to fall back on what you are
familiar with. For example, today I was given this task: For each element,
check to see if each child element has the same "audience" attribute value. If
it does, promote the attribute value up to the element, and delete the
attribute on each child. And repeat this on the document tree until the values
can't bubble up any further. I wanted to use XSLT for this, but I couldn't
readily think of how to do it. So I used a familiar procedural language and
did it in about an hour.
>
> Although my client will be happy, I "cheated" myself out of a chance to
learn to do it with XSLT, and gain a broader understanding of the language.
But sometimes this is the reality of the situation.

Okay... is it me, or is this one of those exceedingly rare cases where
you actually want the 'A!=B' test instead of 'not(A=B)'?
ie, test="*[1]/@audience!=*/@audience" would tell us when something in
this case is 'not' to be promoted?

- Brian


>
> Rick

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.