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

Re: XPath/XSLT 2.0 concerns


xpath xslt starts with
Hi Uche,

> While I can understand, and perhaps with your reasoning here, I must
> say that I write a *lot* of XSLT and have never once come across the
> need for either (1) or (2). I have also worked with a lot of other
> people's XSLT, and haven't seen very many usage patterns that would
> be simplified by template matches based on types.

Interesting. I guess that I mainly come across it when I'm dealing
with document-oriented XML. For example, I have lots of match patterns
that look like:

  *[starts-with(local-name(), 'sect')]

at the moment in order to treat all sections ('sectA', 'sectB', ...)
in the same way, and I've recently taken to defining an is-block()
function in order to work out whether an element is a block elements
in order to know whether they need to be pulled out of paragraphs
(since HTML can't handle nested block elements within paragraphs,
whereas the source language I'm working with can).

I'm not saying that XSLT 1.0 *can't* do these things, but when I find
myself writing exactly the same match pattern time after time, I begin
to think that the elements share something in common, and that really,
for maintainability, I should only have to specify that once.

> Nevertheless, a generic annotation system would solve both these
> requirements, no?

Absolutely!

> Statically typed XPatterns are not the obvious solution to even (1)
> and (2).

I think that they address (1), but not (2).

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.