Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: XSLT question: How to lookup another tag's children in XSLT

From: "roy axenov" <r_axenov@----.-->
To: NULL
Date: 10/1/2006 12:10:00 PM


Joe Kesselman wrote:
> yinglcs wrote:
> Roy: you might want to look up the description of named
> templates, since you're off-base on that point.

Thanks for the pointer, I'm just starting with XSLT myself.
(I have a feeling I'm going to need it soon, so I'm trying
to be prepared ahead of time.)

> > <?xml version="1.0" encoding="UTF-8"?>
> > <root>
> >    . . .
> >    <features>
> >       . . .
> >    </features>
> > </root>
> >
> > 2. Why this does not match anything? I expect this will
> > loop thru each children of "features" and call the name
> > template 'feature'. But apparently, I did something
> > wrong.
> >     <xsl:template match="/features">
>
> /features matches <features> if and only if it's the
> outermost element (child of root). Get rid of the /.

Oh, I completely missed that. That's the problem with the
XSLT I posted, too. It works (sort of), but the first
template doesn't actually match anything because of this
bug.

-- 
roy axenov



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent