S
Stan
Forgive a newbie, please:
I've got XML like this:
<body>
<block>
<p>content of p1</p>
<p>content of p2</p>
<p>content of p3</p>
...
<p>content of pN</p>
</block>
</body>
How can I write an XSLT to spit out the contents of every <p> element,
separated by <p> tags?
This generates the entire contents of the <block> element, of course,
but all in a blob:
<xsl:for-each select="body">
<xsl:value-of select="block">
</xsl:value-of>
</xsl:for-each>
And this generates the contents of the first <p> element followed by a
<p> tag, but not the remaining <p> elements (again, of course):
<xsl:for-each select="nitf/body/body.content/block">
<xsl:value-of select="p"></xsl:value-of>
<p></p>
</xsl:for-each>
I'm sure I'm missing something very simple ...
I've got XML like this:
<body>
<block>
<p>content of p1</p>
<p>content of p2</p>
<p>content of p3</p>
...
<p>content of pN</p>
</block>
</body>
How can I write an XSLT to spit out the contents of every <p> element,
separated by <p> tags?
This generates the entire contents of the <block> element, of course,
but all in a blob:
<xsl:for-each select="body">
<xsl:value-of select="block">
</xsl:value-of>
</xsl:for-each>
And this generates the contents of the first <p> element followed by a
<p> tag, but not the remaining <p> elements (again, of course):
<xsl:for-each select="nitf/body/body.content/block">
<xsl:value-of select="p"></xsl:value-of>
<p></p>
</xsl:for-each>
I'm sure I'm missing something very simple ...