Author |
Message
|
mqsiuser |
Posted: Wed Aug 01, 2012 11:16 pm Post subject: |
|
|
 Yatiri
Joined: 15 Apr 2008 Posts: 637 Location: Germany
|
AFAIK Broker uses one of the available XSLT (runtime) engines... In Broker V6 it is Xalan. So this is nothing developed by the broker team (to be confirmed )... it is like "just integrated" into the product.
If you want to DEBUG you need a design time tool (which probably lets you choose the according runtime engine).
You need to retrieve the (xml) message before the broker xsl transform node... this must be possible! Also: Debugging XSLT really helps in understanding what happens (and how XSLT works)... so you should really try to go down this direction.
E.g. use oXygen to debug your XSLT: Open the input.xml and the stylesheet.xslt. Then click on the icon that looks like "run" with a "bug" at its lower right. Next you can select the xslt runtime engine: MSXML (3.0 or 4.0), Saxon and Xalan (both with various versions).
AFAIK Broker currently supports XSLT 1.0 (so make sure to avoid 2.0 things).
Besides oXygen you may also use XMLSpy, Eclipse or XMLPad.
dyson wrote: |
I'm taking a binary message with 10 items putting it thru the XSL Transform node and out comes the xml with 7 items. |
The input must be XML. Though you can create "non XML" as an output. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Aug 02, 2012 5:52 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
|
Back to top |
|
 |
mqsiuser |
Posted: Thu Aug 02, 2012 7:21 am Post subject: |
|
|
 Yatiri
Joined: 15 Apr 2008 Posts: 637 Location: Germany
|
Imagine xml would just tolerate plain text (and template-match="/" would match to it...) then the stylesheet itself could decide whether to reject the file/document.
But it doesn't. So the author of your article (needs to) wrap the text-file into/with a root-element (manually or with perl).
I know that "having a (single) root element" is one of the design decisions of xml (the w3c doesn't trust the EOF? ... likewise SOAP doesn't trust/use the HTTP-Verbs). |
|
Back to top |
|
 |
dyson |
Posted: Thu Aug 02, 2012 8:46 am Post subject: |
|
|
 Apprentice
Joined: 04 Apr 2011 Posts: 45
|
My bad I should have mentioned that in my scenario the binary is first converted into the broker xml tree via a message set then run thru the xsl. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Aug 02, 2012 11:01 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Right - that changes *everything*. You certainly should have mentioned that before.
[edit]OK, maybe not quite everything...[/edit]
I would convert the message tree generated by the input node into XML. Put that XML through the style sheet using broker's XML Transform node. If that doesn't work, take the same XML and transform it using Saxon or some other free XSL engine. If necessary, use debugging facilities as suggested by mqsiuser in a previous post. |
|
Back to top |
|
 |
dyson |
Posted: Thu Aug 02, 2012 12:12 pm Post subject: |
|
|
 Apprentice
Joined: 04 Apr 2011 Posts: 45
|
yup that's what I did using XMLSpy ... debugging as we speak, thanks again. |
|
Back to top |
|
 |
|