OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] XPath/XSLT 2.0 concerns

[ Lists Home | Date Index | Thread Index ]

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/





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS