|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
XML Transformation Node - XMLNS Support. |
« View previous topic :: View next topic » |
Author |
Message
|
Maverik |
Posted: Mon Jun 19, 2006 5:14 am Post subject: XML Transformation Node - XMLNS Support. |
|
|
Apprentice
Joined: 14 Jun 2005 Posts: 27
|
Hi all,
Does XML Transformation node support transformation of XMLNS messages.
I have an XMLNS message mapped to another, the XSL is also created, but during runtime, i get the error "namespace prefix xmlns could not be resolved".
What am i doing wrong, or is it not possible to use namespaces ? |
|
Back to top |
|
 |
XZ |
Posted: Mon Jun 19, 2006 11:28 pm Post subject: |
|
|
 Apprentice
Joined: 22 May 2006 Posts: 45 Location: IBM Hursley
|
You should be about to do any thing Xalan supports using XMLT node. Have you tried to use Xalan directly? _________________ Regards,
-XZ
WMQI Development |
|
Back to top |
|
 |
vmurali_au |
Posted: Tue Aug 29, 2006 5:56 am Post subject: |
|
|
 Voyager
Joined: 26 Mar 2004 Posts: 76
|
XMLTransformation node in MB 6.0 supports which version of XSLT? 1.0 or 2.0 ?
I found that i cant declare namespace elements with the prefix i need, and the XSLT processor adds its own random prefixes.
I dont want to add namespaces attribute to each element in the output as in XSLT 1.0. I want to declare the namespaces in a top most containing element and just add the prefix of that namespace to the children. Is that possible in XSLT 1.0?
To put it simply, i want to do the following output
<j:Author xmlns:j="http://dummy.com" xmlns:ij="http://dummy1.com">
<ij:Book>
<ij:Title>XML for Dummies</ij:Title>
</ij:Book>
</j:Author> |
|
Back to top |
|
 |
XZ |
Posted: Wed Aug 30, 2006 1:17 am Post subject: |
|
|
 Apprentice
Joined: 22 May 2006 Posts: 45 Location: IBM Hursley
|
XSLT 1.0 (see http://w3.xml.ibm.com/xsl/java/dist/xslt4j-2_6_9/docs/index.html).
I did a little experiment using the following style sheet:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<j:Author xmlns:j="http://dummy.com" xmlns:ij="http://dummy1.com">
<ij:Book>
<ij:Title>XML for Dummies</ij:Title>
</ij:Book>
</j:Author>
</xsl:template>
</xsl:stylesheet>
and got
<?xml version="1.0" encoding="UTF-8"?><j:Author xmlns:j="http://dummy.com" xmlns
:ij="http://dummy1.com"><ij:Book><ij:Title>XML for Dummies</ij:Title></ij:Book><
/j:Author>
Is this not you are after? _________________ Regards,
-XZ
WMQI Development |
|
Back to top |
|
 |
vmurali_au |
Posted: Wed Aug 30, 2006 5:59 am Post subject: |
|
|
 Voyager
Joined: 26 Mar 2004 Posts: 76
|
Sorry i was wrong and was trying to use the <xsl:element> tag availale in XSL to create the <j:Author xmlns:j="http://dummy1.com" xmlns:ij="http://dummy2.com"> tags. In that approach i ran into some problems creating the namespace nodes.
For example, in the above i can specify only one namespace attribute on an element (which is correct, but then i've to specify namespace attribute for each element and not just in the topmost element), and i can't specify which prefix to use for namespace. When i added a namespace attribute , it was created without any prefix.
Right now i understood that i can very well hardcode those element & namespace tags and i can just obtain the value of those tags using <xsl:value-of>
Now i want to know whether i can pass some parameters to XSL? i.e, i want some dynamic stuff to be included in the resulting text which wont be the part of XML message which is getting transformed using stylesheets. As it is dynamic text i cant hardcode those values in the stylesheet.
I know XSL supports parameters, but i want to know whether XMLTransformation node in MB 6.0 supports it.
I'm quite new to XSL so some of my doubts may sound pretty silly  |
|
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
|
|
|
|