this gave me a bit of a headache I had a task where i needed to chop of the last character of one of the XML tags so I could use it in some of the logic statements further down in the code . this did the trick OptioPrinterName_ID180 is the name of the XML tag i wanted to chop the end off and store and 1 at the end is the number of characters to chop
<?xdoxslt:set_variable($_XDOCTX,
‘optioChar’,xdoxslt:right(OptioPrinterName_ID180,1))?>
Then further down in the code when i needed to reference the variable for my logic i Referenced it as follows
<?choose:?>
<?when:xdoxslt:get_variable($_XDOCTX, ‘optioChar’)=‘A‘?>Test<?end when?>
<?otherwise:?>Test2<?end otherwise?>
<?end choose?>
Survivors of a long and bitter JDE Transform installation (you cant imagine the horror man !! ) Mike , Jamie, Roger and Charlie are Four Developers working with the infinitely superior BI publisher to handle all our ERP produced documents. this blog is a place for us to post all of the fiddly bits foibles and general head scratching we have discovered along the way to help out our fellow code monkeys out there
Wednesday, 19 March 2014
BI Publisher Storeing a substring of an XML tag into a variable
Location:
Stubbins, Bury, Lancashire BL0, UK
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment