[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: handling tags and PIs within a macro
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|