xsl-list
[Top] [All Lists]

Re: [xsl] XPath for matching multiple child elements

2006-09-28 10:21:08
On 9/28/06, Michael Kay <mike(_at_)saxonica(_dot_)com> wrote:
Unfortunately while the above is legal in XPath 2.0 in an expression, it's
still not allowed in a pattern - the syntax of patterns is much more
restrictive.

Okay, thanks.  I was sure that I had used syntax like that at some
point while working with XSL.  I've never been aware of the
restrictions placed on patterns.

If you've got a schema then you might find that the elements you want to
match are all members of the same substitution group, in which case you can
write comments//schema-element(inline) where "inline" is the head of the
substitution group. Or the elements might all have the same type, in which
case you can write comments//element(*, inlineType).

Thanks for the suggestion.  Unfortunately, right now I'm working
without a schema, so I can't use this immediately.  I will try to keep
this in mind for the future, though.

Thanks for your help,


Will.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--