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

RE: More XSL Discussion

Subject: RE: More XSL Discussion
From: Matti Katajamaki <matti@xxxxxxxxxxxxx>
Date: Wed, 25 Feb 1998 15:28:38 -0800
katajamaki
Why not generalize the idea to express the number of target elements using BNF 
?, + and * operators, for example:

<rule>
<target-element type="LIST"/>
	<target-element type="ITEM"+/>
	... action part
</rule>

Matti Katajamaki

-----Original Message-----
From:	Michael Kay [SMTP:M.H.Kay@xxxxxxxxxxxxx]
Sent:	Wednesday, February 25, 1998 4:51 AM
To:	xsl-list@xxxxxxxxxxxxxxxx
Subject:	Re: More XSL Discussion

>Michael Kay wrote:
>> You're right, it doesn't make sense to create half an HTML element. It
does make sense, however, to generate one "output" HTML element as a result
of encountering a fairly complex input XML pattern.
>
Paul Prescod replied:
>This is a hard problem, but matching larger patterns may well be the
>best way to attack this. Still, one must weigh the cost of complicating
>the language with a new construct vs. using ad hoc coding tricks in the
>rare case that it comes up.

I think in fact there is one kind of "complex pattern" that would meet 80%
of the requirement and would SIMPLIFY the language: namely "a group of
consecutive elements of the same type". Currently there are three patterns
for "first of type", "last of type" and "only of type", and if any of these
is matched, then the default rule for the element is not matched. If you get
rid of these, and have a rule that matches a sequence of one or more
elements of a type, and that does not inhibit the matching of the individual
elements by a separate rule, then you can generate matching HTML start and
end tags at the start and end of the sequence without any problems.

Extend this to a sequence of elements of one or more named types (replacing
the "first of any", "last of any", and "only of any" qualifiers), and you
now meet 90% of the requirement, again without complicating the language.

Mike Kay


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



 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.