|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
xslt transform node |
« View previous topic :: View next topic » |
Author |
Message
|
veera_clr |
Posted: Mon Nov 09, 2009 1:03 am Post subject: xslt transform node |
|
|
Novice
Joined: 12 Oct 2009 Posts: 17
|
Hi All,
I am new to xslt.
I am using XSL Transform node to transform. I have a xslt logic inside xsl node. I have a requirement to exit from style sheet, if it satsifies one condition, otherwise it has to execute remaining code.
My problem is....
I didnt get xsl code to exit from style sheet at that moment.
If any body knows. Please suggest me to move forward.
Thanks,
Veera |
|
Back to top |
|
 |
veera_clr |
Posted: Mon Nov 09, 2009 1:12 am Post subject: xslt transform node |
|
|
Novice
Joined: 12 Oct 2009 Posts: 17
|
Hi All,
If any body knows the solution, please let me know. this would be the great help for me.
Thanks,
Veera |
|
Back to top |
|
 |
smdavies99 |
Posted: Mon Nov 09, 2009 1:19 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Please have some patience when wanting replies from this forum.
You waited NINE minutes between your first and second posts.
If you want an immediate reply then I suggest that you use the formal support channels with IBM to get it. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
au@kosa |
Posted: Mon Nov 09, 2009 8:57 pm Post subject: |
|
|
 Centurion
Joined: 04 Jan 2007 Posts: 103 Location: pune
|
try using
xsl:if with test
example
<xsl:if test="//OrderLineItemAttribute[Name='ThrottlingFlag']/Value"> _________________ Regards,
au@kosa
IBM Certified SOA Solution Designer/Associate |
|
Back to top |
|
 |
goffinf |
Posted: Sat Nov 14, 2009 4:57 pm Post subject: |
|
|
Chevalier
Joined: 05 Nov 2005 Posts: 401
|
There are lots of ways of doing this but as a tip around the use of XSLT, try NOT to think about it as a procedural language.
You could add a Filter node that tests the input message before it enters your transformation and only allow it though under the right conditions ?
If you want to do it inside the XSLT ....
As previously mentioned :-
<template match="/">
<xsl:if test="put whatever your condition for NOT exiting here typically in the form of an [XPath] expression>
...
</xsl:test>
</xsl:template>
A note on the example already provided, it is nearly always a bad idea to start XPath expressions with //. It is much more efficient and predictable to specify a path for the explict node(s) your trying to locate rather than have the processor traverse a complete descendant tree and rely on 'first one I find that matches' type behaviour.
You could do something similar using <xsl:choose> with <xsl:when test="..."> and <xsl:otherwise>
You could probably use a template with a mode and/or priority ... but its hard to tell with a more concrete example of your input message and your exit condition.
If your question is really just to do with XSLT and you want to learn from the experts then I would suggest going here :-
http://www.mulberrytech.com/xsl/xsl-list/index.html
where you can search the substantial archives, and if you want, subscribe to the forum and post your question. This is a very active list so you should expect to have an answer pretty swiftly.
Hope this helps. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|