--- parser3/src/www/htdocs/Attic/index.html 2001/09/11 08:49:22 1.308 +++ parser3/src/www/htdocs/Attic/index.html 2001/09/18 16:05:43 1.317 @@ -1,33 +1,62 @@ @main[] -#^testdom3[] -#^testdom2[] -#^testdom1[] -^testdom0[] +^xslt[] OK -@testdom3[] -$dom[^dom::load[test.xml]] -$dom[^dom.xslt[test.xsl;$.param1(48)]] -$dom[^dom.xslt[test.xsl;$.param1(48)]] - -@testdom2[] -$dom[^dom::load[test.xml]] -#^dom.save[$.encoding[windows-1251];write.xml] -#^dom.save[;write.xml] -^dom.save[$.encoding[windows-1251] $.method[xml];write.xml] -^dom.save[$.encoding[windows-1251] $.method[html];write.html] -^dom.save[$.encoding[windows-1251] $.method[text];write.txt] - -@testdom1[] -$dom[^dom::load[test.xml]] -$dom[^dom.xslt[test.xsl;$.param1(48)]] -$response:body[^dom.file[windows-1251]] - -@testdom0[] -$dom[^dom::load[test.xml]] -^dom.save[$.encoding[windows-1251];write.xml] -^dom.string[$.encoding[windows-1251]] -$ôàéë[^dom.file[$.encoding[windows-1251]]] -^ôàéë.save[binary;writefile.xml] -$response:body[$ôàéë] -OK \ No newline at end of file +@xslt[] +$dom[^dom::set{ + + + + PAF + + + ÏÈÔ + + +}] + +^show-dnode[$dom]
+$people[^dom.xpath[*/man[@id=1]]] +#^show1[] +#^show-dnodes[$people]
+^show-dnodes2[$people]
+#^people.0.owner.hren[] + +@show1[] +^for[i](0;^people._count[]-1){ + $node[$people.$i] + $node.first-child.value: + $pattributes[$node.parent.attributes] + ^if(^pattributes._count[]){ + $pattributes.id.name=$pattributes.id.value + } +
+} + +@show-dnodes[array][i] +^for[i](0;^array._count[]-1){ + ^show-dnode[$array.$i] +} + +@show-dnode[dnode;level][l] +^for[l](0;$level-1){ ^; ^; ^; ^;} +^if($dnode.type eq element){ + <^;$dnode.name +$pairs[$dnode.attributes] +^if(def $pairs){ + $names[^pairs._keys[]] + ^names.menu{$names.key=$pairs.[$names.key].value } +} +>^; +}{[$dnode.type]} + +^if(def $dnode.value){'$dnode.value'}
+^if(def ${dnode.first-child}){^show-dnode[$dnode.first-child]($level+1)} +^if(def ${dnode.next-sibling}){^show-dnode[$dnode.next-sibling]($level)} + +^if($dnode.type eq element){ +^for[l](0;$level-1){ ^; ^; ^; ^;}<^;/$dnode.name>^;
+} + +@show-dnodes2[people] +^people.string[]