|
Subject: Re: [xsl] [XPath] matching elements which satisfy a specific content model From: Dimitre Novatchev <dnovatchev@xxxxxxxxx> Date: Mon, 13 Jan 2003 02:40:18 -0800 (PST) |
> I need to match a variablelist containing:
>
> 1. An optional title element,
> 2. after this, one or more varlistentry elements.
>
> <t:template match="variablelist[...]">
> ^^^
> How to write
>
> title?, varlistentry+
>
> in XPath?
>
> I think I'm missing something obvious. If it's very simple, then I'm
> happy :)
>
> Else I think it would be great to have something like
content-model():
>
> <t:template
> match="variablelist[content-model(title?,varlistentry+)]">
>
> Tobi
The match pattern is:
variablelist[*[position() = 1 and (self::title or self::varlistentry)]
and not(*[position() > 1 and not(self::varlistentry)])
]
=====
Cheers,
Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] [XPath] matching elements, Tobias Reif | Thread | Re: [xsl] [XPath] matching elements, Tobias Reif |
| [xsl] Date Formating, Arthur | Date | Re: [xsl] [XPath] matching elements, David Carlisle |
| Month |