Re: Conditional extraction of data
Respectfully, I'd like to suggest you guys are all giving Peter very useful information, which is only likely to confuse him, despite (and even exacerbated by) the occasional "aha"!
The solution to his problem is in mastering templates and the recursive template-based processing model, operating over the tree (not the "tags", as David warns). If he understands this, there are a million ways for him to solve his problem (and one very simple, elegant and obvious way). If he doesn't, he'll try all the other stuff (copy-of, value-of, etc etc) and sometimes get what he wants but sometimes not -- never understanding why.
This is only more true of subsequent exercises in the assignment.
Peter, figure out what "apply-templates" does (what does this mean and what is it applying templates to?) and everything else will fall into place. This is the secret of handling mixed content (elements intermixed arbitrarily with text).
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format