![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: need help from xsl guru [Thread Next] Re: need help from xsl guruTo: NULL Date: 11/2/2004 3:04:00 AM eric <ezhou@s...> wrote:
> Hi,Joris:
>
> I checked the html output. it is still a little bit different than I thought.
>
> How can we have something like:
>
> p1 1000
> c1 1001
> c2 1002
> p2 2000
> c3 2001
> p3 3000
If you can compile a Bash shell, then you can try
start () {
case ${XML_ELEMENT_STACK[1]} in
child) [ "$parent_name" ] && printf '%s %s\n' $parent_{name,id}
unset parent_{name,id}
;;
esac
}
data () {
local e=${XML_ELEMENT_STACK[1]}
case $e in
name|id)
pp_append ${XML_ELEMENT_STACK[*]|/^(child|parent)$}
strcpy $2_$e $1
;;
esac
}
end () {
case ${XML_ELEMENT_STACK[1]} in
parent) printf '%s %s\n' $parent_{name,id}
child) printf '\t%s %s\n' $child_{name,id}
esac
}
xml -s start -d data -e end "`< file.xml`"
Ref:
http://freshmeat.net/projects/bashdiff/
--
William Park <opengeometry@y...>
Open Geometry Consulting, Toronto, Canada
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
