Forum Moderators: open
My c++ program spits out a pretty large and entangled xml document, that has nested xml tags, repeated xml tags etc. Look something like
<cat name=mother size= more=
>
<cat name=kid1 size= more=
>
</cat>
<cat name=kid2 size= more=
>
</cat>
</cat>
<dog>some info</dog>
<dog>some more info</dog>
<cat name= type=age>23</cat>
<cat name= type=age>25</cat>
I tried to format this with XSL, but it seems like XSL takes the info sequentially and applies the template (at least thats all I can do for now).
Basically I am just asking if it is possible, just by using XSL, to place attributes at whichever location I want in an html file? Ex:
1st cat <b><xsl:cat nam></b> <i><xsl cat: age></i>
2nd cat <b><xsl:cat nam></b> <i><xsl cat: age></i>
Only now the dogs
<b><xsl:cat nam></b> <i><xsl cat: age></i>
<b><xsl:cat nam></b> <i><xsl cat: age></i>
Now back to the cats
1st cat <b><xsl:cat nam></b> <i><xsl cat: size></i>
2nd cat <b><xsl:cat nam></b> <i><xsl cat: size></i>
I want to treat the info in the tags and between tags as variables that I can place anywhere, without a specific order in the html. Can XSL do this, or should I forget it and go to PHP, Perl or others?
Thanks a lot