xsl-list
[Top] [All Lists]

RE: Real-time XML to XML Conversion?

2003-06-10 13:24:52
      <xsl:for-each select="//USER">
      <AGENT>
              <AGENTNAME><xsl:value-of select="."/></AGENTNAME>
        <xsl:apply-templates select="following-sibling::*"/>
      </AGENT>
      </xsl:for-each>

Hi Heath,

It appears that your doubly matching your agent clyde because of a
miscalculation in what you need to do once you perform a match.  Look at
your algorithm again, and notice that you 

while( user )
1. Do user
2. Do sibling
end while

now, since the sibling is also a user, then you are doing two users in
the outer loop (in your sample file), and also doing the second of those
two in the inner loop.  if you had three, it would be like this:

sample: users a,b,c
output: agents a,b,c,b,c,c

of course, with the limited children of some of the because they are
matched separately.

My second question is one of functionality. While what I've tried so 
far does produce an output file that looks like a new XML file, that's

not what I need. I actually need the new XML data to be immediately 
available to be manipulated by the XSLT which is doing the tree 
conversion. Make sense?


Is this similar to the current thread on "[xsl] read/write in the same
xml file" ??

I hope this helps,
Jonathan


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>