Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML <para> display through XSL (newbie)

Status
Not open for further replies.

pramenjatjek

Programmer
Feb 16, 2003
4
AU
Hi

I'm just starting with XML. I've created a file where I've placed all the paragraphs in <para> tags, but they're not all sequential. How can I refer to these paragraphs in the XSL page?

This is the xml:

<tocPage>
<moduleHeading>....</moduleHeading>
<overview>
<para>In this module .....</para>
<mainLink item=&quot;m9_01&quot;>
<name>Why undertake financial analysis?</name>
</mainLink>
<mainLink item=&quot;m9_02&quot;>
<name>Horizontal analysis of data</name>
</mainLink>
<para>To start....</para>
</overview>
</tocPage>

and this is the xsl:

...
<p class=&quot;moduleHdr&quot;><xsl:value-of select=&quot;moduleHeading&quot;/></p>

<p><xsl:value-of select=&quot;overview/para&quot;/></p>

<table width=&quot;60%&quot; border=&quot;0&quot; background=&quot;{overview/images/tableBg/source}&quot;>
<xsl:for-each select=&quot;overview/mainLink&quot;>
<xsl:variable name=&quot;file_name&quot;>
<xsl:value-of select=&quot;@item&quot;/>
</xsl:variable>
<tr>
<td width=&quot;2%&quot; height=&quot;15&quot;><img src=&quot;{$bulletS}&quot; width=&quot;{$bulletW}&quot; height=&quot;{$bulletH}&quot; alt=&quot;{$bulletA}&quot;/></td>
<td width=&quot;98%&quot;><a href=&quot;{concat($file_name,'.htm')}&quot; target=&quot;_top&quot;><xsl:value-of select=&quot;name&quot;/></a></td>
</tr>
</xsl:for-each>
</table>

<p><xsl:value-of select=&quot;overview/para&quot;/></p>

....

How can I specify in my XSL document that the layout has to be the same, eg moduleHeading first, then the first paragraph, then the links, and only then the second paragraph? Surely I don't have to give each paragraph a unique name?


Thank you!


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top