|
Subject: [xsl] Unwanted New Line on Output From: Matt <puskas.duck@xxxxxxxxx> Date: Mon, 18 Jun 2007 10:49:17 +0100 |
<DEPT_DETAILS>
<DEPT>
1
<EMPS>
<EMP_NAME> Fred Bloggs</EMP_NAME>
<EMP_AGE> 25 </EMP_AGE>
</EMPS>
<EMPS>
<EMP_NAME> Joe Smith</EMP_NAME>
<EMP_AGE> 35 </EMP_AGE>
</EMPS>
</DEPT>
<DEPT>
2
<EMPS>
<EMP_NAME> Jill Bloggs</EMP_NAME>
<EMP_AGE> 19 </EMP_AGE>
</EMPS>
<EMPS>
<EMP_NAME> Gerry Halliwell</EMP_NAME>
<EMP_AGE> 45 </EMP_AGE>
</EMPS>
</DEPT>
</DEPT_DETAILS>1 Fred Bloggs 1 Joe Smith 2 Jill Bloggs 2 Gerry Halliwell
<xsl:template mode="depts" match="*">
<xsl:param name="deptID" select="DEPT"/>
<xsl:for-each select="EMPS">
<xsl:value-of select="$deptID"/>
<xsl:value-of select="EMP_NAME"/>
<xsl:text> </xsl:text> <!-- Add CR -->
</xsl:for-each>
</xsl:template>1 Fred Bloggs 1 Joe Smith 2 Jill Bloggs 2 Gerry Halliwell
With the emp name being on a second line. Is this caused because the dept_id is at a higher level in the XML structure? Is this a problem with my select="DEPT" actually selecting something more than just the ID for the department.
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] EXSLT support report, Peter Mozolik | Thread | RE: [xsl] Unwanted New Line on Outp, Michael Kay |
| RE: [xsl] EXSLT support report, Michael Kay | Date | Re: [xsl] grouping-problem, Annina . Hirschi-Wys |
| Month |