I tries to transform xml with Joost(STX), but I found that sometimes the child nodes cannot be matched and transformed.
Finally I found the problem was tied with the XML namespace, and made the transform working in this way, please notice the prefix "myns" both in root node and child nodes:
Source XML:
<RootNode xmlns="http://.... " >
<ChildNode>
....
STX:
<stx:transform version="1.0"
xmlns:stx="http://stx.sourceforge.net/2002/ns"
xmlns:myns="http://www.../" >
<stx:template match="myns:RootNode">
...
<stx:template>
<stx:template match="myns:ChildNode">
...
<stx:template>
2008年8月26日星期二
How to output new line in result xml in STX transform
I'm new to professional xml develop and boring the transformed result xml is always one large line those days.
Now I found the way out,
"<stx:text>&# xA;</stx:text>" is the solution!
(please remove the white space, google can not post xml code?)
Now I found the way out,
"<stx:text>&# xA;</stx:text>" is the solution!
(please remove the white space, google can not post xml code?)
订阅:
博文 (Atom)