Subject: RE: [xsl] XSL Help!! From: "Chandra -" <pchandramohan@xxxxxxxxxxx> Date: Thu, 05 Dec 2002 21:16:57 -0500 |
Thank You so much. Your email was extremely helpful. Cheers, Chandra
Chandra, you might want to look through the XSLT FAQ at http://www.dpawson.co.uk/. This along with some of the books suggested at the site can help a lot. But to answer your questions:
> When u say <xsl:apply-templates select="NAME"/>, Will all the > NAME nodes > under MEMBER be selected(say there are more than 1 NAME nodes under > MEMBER)?
yes (but only NAME children, not descendants that are an lower in the hierarchy)
>Also will the NAME template rule be applied to each > one of the NAME > nodes before the Phone node is selected?
> > 2) > <xsl:variable name='signers' > select=/legal_authenticator/person'/> > <xsl:if test='$signers'> > ..... > ..... > </xsl:if> > > What is the xsl:if tag doing here? Is it testing whether > /legal_authenticator/person' exists??
> > 3)<person_name> > <nm> > <GIV V="Henry"/> > <FAM V="Levin"/> > </nm> > <person_name.type_cd V="L" S="2d"/> > </person_name> > > For the above xml, I see the following in the stylesheet > <xsl:apply-templates > select='person_name[person_name.type_cd/@V="L"]'/> > What do the [] mean?? Why can't I just have / instead of the []??
[] is what the XSLT spec calls a predicate. It's a way of specifying a criteria rather than pointing to a specific node. So, what this select is saying (in English) is:
Select all person_name nodes from the current context that contain a person_name.type_cd element with a V attribute whose value is "L"
But what is selected is the person_name node and that's what the XSLT engine looks for and how it selects the template to apply to person_name. If you had this instead:
Select the V attribute on the person_name.type_cd element that is a child of a person_name element that is a child of the current context.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XSL Help!!, Peter Davis | Thread | RE: [xsl] XSL Help!!, sara . mitchell |
Re: [xsl] is the variable really ou, bix xslt | Date | RE: [xsl] Default Namespace version, Shea, Michael |
Month |