It just returns the last value when I try that (Telephone Number=6955_3<)
what I would like to do is display each one. Thanks.
Main Topics
Browse All TopicsWe are using Oracle XML Publisher to generate PDF formatted Purchase Order Reports. We have tried Oracle Support, but haven't got anywhere, hence trying here...
As part of this work, we have hit a problem.
Part of the XML contains the following data:
<PO_DATA>
<LINE_ATTACHMENTS>
<TEXT> Telephone Number=6955_1 </TEXT>
<ID>765923</ID>
<TEXT> Telephone Number=6955_2 </TEXT>
<ID>765924</ID>
<TEXT>Telephone Number=6955_3</TEXT>
<ID>765925</ID>
</LINE_ATTACHMENTS>
</PO_DATA>
What we want to do is to loop through the values in the <LINE_ATTACHMENTS> tag, and output the Text Value.
If we try the following snippet:
<?/PO_DATA/LINE_ATTACHMENT
Then when we view the output, the XSL will always display the value of the 3rd iteration of the <TEXT> tag.
That's okay - but we don't want to hard code the [3] value. We want instead for the number there to be the row count that is currently being used.
We have tried this:
<?/PO_DATA/LINE_ATTACHMENT
But a long error message was returned.
Basically, we want to increment a variable for each loop through the data, and output the value of that incremented variable in the square brackets as detailed above.
Can this be done?
Thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Thanks Geert,
I found this by debugging an Oracle document. I've got to try and figure out how to get it into the RTF doc that XML publisher uses. Failing that, I will have to just modifiy the XSL that template builder produces.
Can you see what's going on here?
Cheers,
- <xsl:for-each select="$LINE_LONG_ATTACHM
- <xsl:if test="$lineID = .">
<xsl:variable name="line" select="position()" />
<xsl:value-of select="../TEXT[$line]" />
<fo:block />
</xsl:if>
</xsl:for-each>
Business Accounts
Answer for Membership
by: GertonePosted on 2007-03-29 at 03:36:35ID: 18814821
try S/TEXT[pos ition()=la st()]?>
<?/PO_DATA/LINE_ATTACHMENT