A
Alex
Hello,
I don't have sufficient experience with XSLT, and would really
appreciate somebody's help in me giving ideas on solving a problem I
have. Let's consider the following XML file:
<RootNode>
<RootNode:SubNode1>
<RootNode:SubNode1:SubNode1>...</RootNode:SubNode1:SunNode1>
</RootNode:SubNode1>
<RootNode:SubNode2>
<RootNode:SubNode2:SubNode1>...</RootNode:SubNode1:SunNode1>
<RootNode:SubNode2:SubNode2>...</RootNode:SubNode1:SunNode2>
</RootNode:SubNode2>
. . .
</RootNode>
This file has only 2 known features:
1. The name of the root node is RootNode
2. We DON'T KNOW the names of the children nodes in advance. We do
know, however, that they are formed by combining the name of the parent
with the name of the child; colon is used as a separator.
I need to format the data and to get rid of long node names (leaving
only the last part of the name):
RootNode
SubNode1
SubNode1 -> Node's data
SubNode2
SubNode1 -> Node's data
SubNode1 -> Node's data
Since the nodes names are not known in advance, I assume there is no a
straighforward way of using XSLT templates for processing. I would
appreciate your ideas.
Thanks a lot!
Alex.
I don't have sufficient experience with XSLT, and would really
appreciate somebody's help in me giving ideas on solving a problem I
have. Let's consider the following XML file:
<RootNode>
<RootNode:SubNode1>
<RootNode:SubNode1:SubNode1>...</RootNode:SubNode1:SunNode1>
</RootNode:SubNode1>
<RootNode:SubNode2>
<RootNode:SubNode2:SubNode1>...</RootNode:SubNode1:SunNode1>
<RootNode:SubNode2:SubNode2>...</RootNode:SubNode1:SunNode2>
</RootNode:SubNode2>
. . .
</RootNode>
This file has only 2 known features:
1. The name of the root node is RootNode
2. We DON'T KNOW the names of the children nodes in advance. We do
know, however, that they are formed by combining the name of the parent
with the name of the child; colon is used as a separator.
I need to format the data and to get rid of long node names (leaving
only the last part of the name):
RootNode
SubNode1
SubNode1 -> Node's data
SubNode2
SubNode1 -> Node's data
SubNode1 -> Node's data
Since the nodes names are not known in advance, I assume there is no a
straighforward way of using XSLT templates for processing. I would
appreciate your ideas.
Thanks a lot!
Alex.