Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

xsl question

Asmirnov-OracleNov 7 2002
Dear xsl gurus!

My very limited knowledge of xsl doesn't allow me to come up with better solution.Can you please suggest something looking better.

My xml document has very simple structure with 3 subnodes of the same level:

...
<DOC>
<a>...</a>
<b>...</b>
</DOC>
...

The info from under <a> and <b> nodes should go under one node (into one table column). The best I could think of is to make it go under two diff columns COLUMN_A and COLUMN_B of some staging table and then concatenate those columns. For this I came up with this xsl:
...
<xsl:for-each select="DOC">
<ROW>
<xsl:for-each select="./a">
<COLUMN_A>
<xsl:value-of select="."/>
</COLUMN_A>
</xsl:for-each>
<xsl:for-each select="./b">
<COLUMN_B>
<xsl:value-of select="."/>
</COLUMN_B>
</xsl:for-each>
</ROW>
</xsl:for-each>

How can I make <a> and <b> go under the same node so that I wouldn't need a staging table?
Thank you.

Anatoliy Smirnov
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 7 2002
Added on Nov 7 2002
5 comments
206 views