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

syntax feedback

Subject: syntax feedback
From: "Lawton, Scott" <slawton@xxxxxxxxxxxx>
Date: Tue, 10 Nov 1998 13:04:10 -0500
xsl when example attribute exists
I find the XSL pattern syntax confusing.  I think it traces to two points:
- the action is often implied not stated
- when I see parens, I think "function call"

For example: <xsl:when test="attribute(color)">

What does that mean?  It's hard to know just by reading it.  Here are a
bunch of possible alternatives:
	<xsl:when test="hasAttribute"     value="color">
	<xsl:when test="attribute.exists" value="color">
	<xsl:when test="exists"              value="attribute.color">

Or even:
	<xsl:when test="attribute.exists(color)">

...

Despite going back to the spec many times, I have trouble expressing things
like:
	when there's an attribute "x" with value "1"
	when the parent tag is "a"
	when the parent tag has an attribute "y"	
	when there's an ancestor "a"
	when an ancestor has an attribute "y"
	when ancestor "a" has an attribute "y"
... and especially combining those with (logically at least) AND & OR.

Granted, I'm just one data point (though probably more technical than the
average HTML coder).  Is there a mechanism in place for "usability testing"?
Or a set of benchmark cases that should be easy for the average HTML coder?
As an outsider, I was struck by the wisdom of keeping the "desperate perl
hacker" in mind when creating the XML spec.  Maybe there's an analog here
too?

$0.25,

Scott


 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.