[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

syntax feedback


Subject: syntax feedback
From: "Lawton, Scott" <slawton@xxxxxxxxxxxx>
Date: Tue, 10 Nov 1998 13:04:10 -0500

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
Keywords