I have been helping a JD Edwards customer over the last few days. Nothing too tough but the XML that JDE spits out can have its own 'issues'. In JDE you can use their App engine to generate reports, a UBE. It has been modified to spit out XML too but the structure can be a bit daunting.
Here's a PO XML structure:
Not too bad on the surface but the XML is generated in 'pages' - the engine in its former use generates the layout of the report in a page fashion for the rendering engine to generate the output.
This means things can get a little funky in the template because we dont care about pages in the data - the BIP rendering engine will handle all that for you.
Mac at GW Electronics has been getting to grips with RTF templates and the XML, he had also started down the path of using XPATH to navigate around the XML to get the data he needed for various parts of the report.
He had also alighted on the use of our updatable variables to help get the right element. He had things like:
where the variable was being updated as the template looped over the XML groups. It was not working very well. It's nasty and will come at a cost, albeit a small one.
Im not a fan of our updatable variables - talk to an XSL purist and they will tell you we have committed blasphemy for providing them in our engine. My beef with them is that they are too verbose and expensive in terms of resources.
Looking at Mac's template and having the benefit of having a decent XML editor (XMLSpy) on my machine I was able to spot that he could use.
To get to the same data item - much simpler no? The takeaway from this? Arm yourself with a decent XML editor - and learn the data structure you are working with. XMLSpy will cost you but there are others out there that can help with working out navigation paths through the XML and stay away from those updateable variables if you can