Lists Home |
Date Index |
- To: XMLDEV <email@example.com>
- Subject: RE: [xml-dev] Streaming Transformations for XML
- From: Jandia Cyril <firstname.lastname@example.org>
- Date: Thu, 14 Feb 2002 12:29:48 +0100
- Importance: Normal
- In-reply-to: <3C6A8430.email@example.com>
Hi again Petr ;o) - Hi all,
> From: Petr Cimprich <firstname.lastname@example.org>
> To: "'email@example.com'" <firstname.lastname@example.org>
> Subject: [xml-dev] Streaming Transformations for XML
> I'm playing with an idea of a streaming transformation language.
> Petr Cimprich
> Ginger Alliance
Making the assumption STX will be useful on its own (as soon as precisely
described :-) here are some "day after" thoughts (in no particular order)
about it - in the hope of helping it, while keeping it as simple as it
I have a problem with your "stx:copy-of" operator.
Don't you think it would be quite difficult to give it precise and simple
semantics if you let it as it is now? I mean : under the form of an
What's the point? Well, as I understand it now, it is free to appear (or
not) at beginning/end of a stx:template's child list. So, what happens if
you omit it in either of these template occurrences :
Then, I foresee you'll have to add many usage conditions for
restricting/controlling its appearance in context, in order for it to have
determistic effect, won't you?
Thus, I guess it would be more unambiguous to re-introduce it (from its
STX-transform-operator nature point of view) as an attribute : copy="yes|no"
now here's your transform sample, back, in STX, say "version 0.2" (which is
<stx:variable name="date" select="'Monday'"/>
<stx:template match="element-start::list" copy="yes"
<stx:attribute name="date" select="$date"/>
<stx:template match="element-start::item" copy="yes">
<note>the item we have been looking for</note>
<!-- and why not RegExp, BTW ?
("$1" in "<stx:value-of select..." gets its value from the regexp pattern
(in parenthesis) of
"<stx:template match='...'") -->
Also, what do you think of this RegExp idea ? I like it.
But, am I not off topic (concerning envisioned STX simplicity) ?
Finally, I propose to add the following to your list of "SAX axes" :
"after-element-start::" (as a synonym of "element-start::"),
"before-element-end::" (as a synonym of "element-end::"),
and "before-element-start::", "after-element-end::" (for completeness).
Does all that make sense ?
Author of ESPX/TinyXSL