Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How XSL Processor reads ???

 
Micheal Jacob
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everybody ,
This is my xml.

This is my xsl.

Whether the output will be
a1# a2# b1# b2# b3# b4# or
a1# b1# b2# a2# b3# b4#
I hope somebody will focus some light on this.
Micheal
 
Rajan Thiyagarajan
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The answer is a1# b1# b2# a2# b3# b4#
Since all elements are scanned(for-each)for their respective "id" attribute value from the "source" elements the template matching will be done in a sequential order.
-rajan-
 
Micheal Jacob
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I think it is processor dependent.
becasue i am using XML SPY inbuilt xslt processor where i get a1#a2#...
Micheal
 
Rajan Thiyagarajan
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Me too have checked in XML Spy. But I got a1# b1# b2# a2# b3# b4#.
I donot know why you got a different answer. Some others please help !
 
Deepti Dixit
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
XMLSPY gives : a1# a2# b1# b2# b3# b4#. That seems to be the right answer if it matches node A and that applies for loop for 'A'. Then matches B and applies for the for loop fpr B. Is this reasoning correct?
 
Micheal Jacob
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Deepti,
Normally, it should read all the children of first node A, then it should go to second node A.
From your answer, do you mean to say, that * sorts the node by ascending....so that it prints A first & B next ?
if this is not what you mean, then i didnt get you, Please be clear.
Micheal
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic