|
Subject: Re: [xsl] handling tags and PIs within a macro From: Nancy Brandt <nancy_brndt@xxxxxxxxx> Date: Tue, 23 Oct 2007 09:09:52 -0700 (PDT) |
Thanks for your help, David!
I am testing the suggested template.
Regards,
Nancy
--- David Carlisle <davidc@xxxxxxxxx> wrote:
>
>
> > I just need to have dsc right after cmd, and
> that's
> > really important. How can I do that?
>
> The order of the elements in the source does not
> matter as your template
> controls the order that they are processed.
>
>
> you had
>
>
>
> <xsl:template match="j_entry">
> <row>
> <entry>
> <xsl:element name="formalpara">
> <xsl:attribute name="id">
> <xsl:value-of select="@fid"/>
> </xsl:attribute>
> <title>
> <xsl:value-of select="@cmd"/>
> </title>
> </xsl:element>
>
> <formalpara>
> <title>Description</title>
> <xsl:value-of select="@dsc"/>
> </formalpara>
>
> <formalpara>
> <title>Relevant to</title>
> <xsl:value-of select="@rel"/>
> </formalpara>
>
> <formalpara>
> <title>Type</title>
> <xsl:value-of select="@t"/>
> </formalpara>
>
> <formalpara>
> <title>Default Value</title>
> <xsl:value-of select="@val"/>
> </formalpara>
> </entry>
> </row>
> </xsl:template>
>
>
> So cmd is processed before dsc whatever order they
> are in the source.
>
> You want to change
>
> <xsl:value-of select="@val"/
>
> to
>
> <xsl:apply-templates select="val"/>
>
> (note that by mistake I left in the @ in my previous
> reply)
>
> so something like
>
>
> <xsl:template match="j_entry">
> <row>
> <entry>
> <formalpara id="{fid}"/>
> <title>
> <xsl:apply-templates select="cmd"/>
> </title>
> </formalpara
>
> <formalpara>
> <title>Description</title>
> <xsl:apply-templates select="dsc"/>
> </formalpara>
>
> <formalpara>
> <title>Relevant to</title>
> <xsl:apply-templates select="rel"/>
> </formalpara>
>
> <formalpara>
> <title>Type</title>
> <xsl:apply-templates select="t"/>
> </formalpara>
>
> <formalpara>
> <title>Default Value</title>
> <xsl:apply-templates select="val"/>
> </formalpara>
> </entry>
> </row>
> </xsl:template>
>
>
________________________________________________________________________
> The Numerical Algorithms Group Ltd is a company
> registered in England
> and Wales with company number 1249803. The
> registered office is:
> Wilkinson House, Jordan Hill Road, Oxford OX2 8DR,
> United Kingdom.
>
> This e-mail has been scanned for all viruses by
> Star. The service is
> powered by MessageLabs.
>
________________________________________________________________________
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] handling tags and PIs wit, David Carlisle | Thread | Re: [xsl] handling tags and PIs wit, Wendell Piez |
| RE: [xsl] handling tags and PIs wit, Wendell Piez | Date | Re: [xsl] handling tags and PIs wit, Wendell Piez |
| Month |