You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by brijesh <br...@gmail.com> on 2009/03/20 16:00:14 UTC
saxon-xslt & for-each iterator
hello ,
I have servicemix-saxon su with following xslt
<?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="/">
<test>
<xsl:for-each select="catalog/cd">
<cd>
<xsl:value-of select="title"/>
<xsl:value-of select="artist"/>
</cd>
</xsl:for-each>
</test>
</xsl:template></xsl:stylesheet>
following is xbean configuration
<beans xmlns:saxon="http://servicemix.apache.org/saxon/1.0"
xmlns:nte="http://www.ekaplus.com/NotifyEvent/"
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://servicemix.apache.org/saxon/1.0
http://servicemix.apache.org/schema/servicemix-saxon-3.2.3.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<!-- START SNIPPET: xslt -->
<saxon:xslt service="nte:transformToDoc" endpoint="nte:transformToDocEP"
resource="classpath:transform.xsl" />
<!-- END SNIPPET: xslt -->
</beans>
xml file as follows
<catalog>
<cd>
<title>Empire Burlesque</title>
<artist>Bob Dylan</artist>
<country>USA</country>
<company>Columbia</company>
<price>10.90</price>
<year>1985</year>
</cd>
<cd>
<title>Hide your heart</title>
<artist>Bonnie Tyler</artist>
<country>UK</country>
<company>CBS Records</company>
<price>9.90</price>
<year>1988</year>
</cd>
<cd>
<title>Greatest Hits</title>
<artist>Dolly Parton</artist>
<country>USA</country>
<company>RCA</company>
<price>9.90</price>
<year>1982</year>
</cd>
</catalog>
I am getting the result as follows
<test/>
but my expected result was
<test><cd>Empire BurlesqueBob Dylan</cd><cd>Hide your heartBonnie
Tyler</cd><cd>Greatest HitsDolly Parton</cd></test>
can anybody point out the mistake here , it seems that for-each xslt
iterator is not working with saxon-xslt
regards
Brijesh N K
--
View this message in context: http://www.nabble.com/saxon-xslt---for-each-iterator-tp22621757p22621757.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: saxon-xslt & for-each iterator
Posted by jb...@nanthrax.net.
I guess that your in message comes from a HTTP or CXF-BC component. Correct ?
In this case, the soap:Envloper is a "normal" behavior and you need to apply the corresponding template : that's why you have <test/> as result : there is not template applicable.
Change your XSL to main template to Envelope/Body/notifyEvent/in for example.
Another way is to cleanup the incoming message to get only the content (can be done with a bean or camel).
Regards
JB
On Monday 23 March 2009 - 02:32, brijesh wrote:
>
> JB,
>
> thanks for the input, I tried that also but no luck,
> but what i observed is , the xml file which is going into xslt tranformation
> has soap envelope tags. as given below
>
> <soap:Envelope
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><not:notifyEvent
> xmlns:not="http://www.ekaplus.com/NotifyEvent/">
> <in><catalog>
> <cd>
> <title>Empire Burlesque</title>
> <artist>Bob Dylan</artist>
> <country>USA</country>
> <company>Columbia</company>
> <price>10.90</price>
> <year>1985</year>
> </cd>
> <cd>
> <title>Hide your heart</title>
> <artist>Bonnie Tyler</artist>
> <country>UK</country>
> <company>CBS Records</company>
> <price>9.90</price>
> <year>1988</year>
> </cd>
> </catalog>
> </in>
> </not:notifyEvent></soap:Body></soap:Envelope>
>
> is it required to take care of soap tags also , while creating xslt or is
> there a way to remove the soap tag and pass only the payload to
> transformation ??
>
> thanks for the valuable input
>
> regards
>
> Brijesh N K
>
>
>
>
> Jean-Baptiste Onofré wrote:
> >
> > Hi,
> >
> > have you tried :
> >
> > <xsl:template match="catalog">
> > <test>
> > <xsl:apply-template/>
> > </test>
> > </xsl:template>
> > <xsl:template match="catalog/cd">
> > <cd>
> > <xsl:value-of select="title"/>
> > <xsl:value-of select="artist"/>
> > </cd>
> > </xsl:template>
> >
> > ?
> >
> > Regards
> > JB
> >
> > On Friday 20 March 2009 - 08:00, brijesh wrote:
> >>
> >> hello ,
> >>
> >> I have servicemix-saxon su with following xslt
> >>
> >> <?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="/">
> >> <test>
> >> <xsl:for-each select="catalog/cd">
> >> <cd>
> >> <xsl:value-of select="title"/>
> >> <xsl:value-of select="artist"/>
> >> </cd>
> >> </xsl:for-each>
> >> </test>
> >>
> >> </xsl:template></xsl:stylesheet>
> >>
> >> following is xbean configuration
> >>
> >> <beans xmlns:saxon="http://servicemix.apache.org/saxon/1.0"
> >> xmlns:nte="http://www.ekaplus.com/NotifyEvent/"
> >> xmlns="http://www.springframework.org/schema/beans"
> >> xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
> >> xsi:schemaLocation="http://servicemix.apache.org/saxon/1.0
> >> http://servicemix.apache.org/schema/servicemix-saxon-3.2.3.xsd
> >> http://www.springframework.org/schema/beans
> >> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
> >>
> >> <!-- START SNIPPET: xslt -->
> >> <saxon:xslt service="nte:transformToDoc"
> >> endpoint="nte:transformToDocEP"
> >> resource="classpath:transform.xsl" />
> >> <!-- END SNIPPET: xslt -->
> >>
> >> </beans>
> >>
> >> xml file as follows
> >>
> >> <catalog>
> >> <cd>
> >> <title>Empire Burlesque</title>
> >> <artist>Bob Dylan</artist>
> >> <country>USA</country>
> >> <company>Columbia</company>
> >> <price>10.90</price>
> >> <year>1985</year>
> >> </cd>
> >> <cd>
> >> <title>Hide your heart</title>
> >> <artist>Bonnie Tyler</artist>
> >> <country>UK</country>
> >> <company>CBS Records</company>
> >> <price>9.90</price>
> >> <year>1988</year>
> >> </cd>
> >> <cd>
> >> <title>Greatest Hits</title>
> >> <artist>Dolly Parton</artist>
> >> <country>USA</country>
> >> <company>RCA</company>
> >> <price>9.90</price>
> >> <year>1982</year>
> >> </cd>
> >> </catalog>
> >>
> >> I am getting the result as follows
> >>
> >>
> >> <test/>
> >>
> >> but my expected result was
> >>
> >> <test><cd>Empire BurlesqueBob Dylan</cd><cd>Hide your heartBonnie
> >> Tyler</cd><cd>Greatest HitsDolly Parton</cd></test>
> >>
> >>
> >> can anybody point out the mistake here , it seems that for-each xslt
> >> iterator is not working with saxon-xslt
> >>
> >>
> >> regards
> >>
> >> Brijesh N K
> >> --
> >> View this message in context:
> >> http://www.nabble.com/saxon-xslt---for-each-iterator-tp22621757p22621757.html
> >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> >>
> >
> >
>
> --
> View this message in context: http://www.nabble.com/saxon-xslt---for-each-iterator-tp22621757p22656753.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
Re: saxon-xslt & for-each iterator
Posted by Gert Vanthienen <ge...@gmail.com>.
Brijesh,
You should be able to remove the soapEnvelope by adding
useJBIWrapper="false" and useSOAPEnvelope="false" on your CXF BC
endpoint. This way, only the plain XML message payload will be sent
to your Saxon SU.
Regards,
Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/
2009/3/23 Guillaume Nodet <gn...@gmail.com>:
> The soap envelope should not really be sent inside the NMR.
> This may happen depending on your configuration of your BC though.
>
> On Mon, Mar 23, 2009 at 10:32, brijesh <br...@gmail.com> wrote:
>>
>> JB,
>>
>> thanks for the input, I tried that also but no luck,
>> but what i observed is , the xml file which is going into xslt tranformation
>> has soap envelope tags. as given below
>>
>> <soap:Envelope
>> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><not:notifyEvent
>> xmlns:not="http://www.ekaplus.com/NotifyEvent/">
>> <in><catalog>
>> <cd>
>> <title>Empire Burlesque</title>
>> <artist>Bob Dylan</artist>
>> <country>USA</country>
>> <company>Columbia</company>
>> <price>10.90</price>
>> <year>1985</year>
>> </cd>
>> <cd>
>> <title>Hide your heart</title>
>> <artist>Bonnie Tyler</artist>
>> <country>UK</country>
>> <company>CBS Records</company>
>> <price>9.90</price>
>> <year>1988</year>
>> </cd>
>> </catalog>
>> </in>
>> </not:notifyEvent></soap:Body></soap:Envelope>
>>
>> is it required to take care of soap tags also , while creating xslt or is
>> there a way to remove the soap tag and pass only the payload to
>> transformation ??
>>
>> thanks for the valuable input
>>
>> regards
>>
>> Brijesh N K
>>
>>
>>
>>
>> Jean-Baptiste Onofré wrote:
>>>
>>> Hi,
>>>
>>> have you tried :
>>>
>>> <xsl:template match="catalog">
>>> <test>
>>> <xsl:apply-template/>
>>> </test>
>>> </xsl:template>
>>> <xsl:template match="catalog/cd">
>>> <cd>
>>> <xsl:value-of select="title"/>
>>> <xsl:value-of select="artist"/>
>>> </cd>
>>> </xsl:template>
>>>
>>> ?
>>>
>>> Regards
>>> JB
>>>
>>> On Friday 20 March 2009 - 08:00, brijesh wrote:
>>>>
>>>> hello ,
>>>>
>>>> I have servicemix-saxon su with following xslt
>>>>
>>>> <?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="/">
>>>> <test>
>>>> <xsl:for-each select="catalog/cd">
>>>> <cd>
>>>> <xsl:value-of select="title"/>
>>>> <xsl:value-of select="artist"/>
>>>> </cd>
>>>> </xsl:for-each>
>>>> </test>
>>>>
>>>> </xsl:template></xsl:stylesheet>
>>>>
>>>> following is xbean configuration
>>>>
>>>> <beans xmlns:saxon="http://servicemix.apache.org/saxon/1.0"
>>>> xmlns:nte="http://www.ekaplus.com/NotifyEvent/"
>>>> xmlns="http://www.springframework.org/schema/beans"
>>>> xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
>>>> xsi:schemaLocation="http://servicemix.apache.org/saxon/1.0
>>>> http://servicemix.apache.org/schema/servicemix-saxon-3.2.3.xsd
>>>> http://www.springframework.org/schema/beans
>>>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>>>>
>>>> <!-- START SNIPPET: xslt -->
>>>> <saxon:xslt service="nte:transformToDoc"
>>>> endpoint="nte:transformToDocEP"
>>>> resource="classpath:transform.xsl" />
>>>> <!-- END SNIPPET: xslt -->
>>>>
>>>> </beans>
>>>>
>>>> xml file as follows
>>>>
>>>> <catalog>
>>>> <cd>
>>>> <title>Empire Burlesque</title>
>>>> <artist>Bob Dylan</artist>
>>>> <country>USA</country>
>>>> <company>Columbia</company>
>>>> <price>10.90</price>
>>>> <year>1985</year>
>>>> </cd>
>>>> <cd>
>>>> <title>Hide your heart</title>
>>>> <artist>Bonnie Tyler</artist>
>>>> <country>UK</country>
>>>> <company>CBS Records</company>
>>>> <price>9.90</price>
>>>> <year>1988</year>
>>>> </cd>
>>>> <cd>
>>>> <title>Greatest Hits</title>
>>>> <artist>Dolly Parton</artist>
>>>> <country>USA</country>
>>>> <company>RCA</company>
>>>> <price>9.90</price>
>>>> <year>1982</year>
>>>> </cd>
>>>> </catalog>
>>>>
>>>> I am getting the result as follows
>>>>
>>>>
>>>> <test/>
>>>>
>>>> but my expected result was
>>>>
>>>> <test><cd>Empire BurlesqueBob Dylan</cd><cd>Hide your heartBonnie
>>>> Tyler</cd><cd>Greatest HitsDolly Parton</cd></test>
>>>>
>>>>
>>>> can anybody point out the mistake here , it seems that for-each xslt
>>>> iterator is not working with saxon-xslt
>>>>
>>>>
>>>> regards
>>>>
>>>> Brijesh N K
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/saxon-xslt---for-each-iterator-tp22621757p22621757.html
>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>>
>>>
>>>
>>
>> --
>> View this message in context: http://www.nabble.com/saxon-xslt---for-each-iterator-tp22621757p22656753.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
>
>
>
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
>
Re: Facing problem in using CXF in SMX.
Posted by Freeman Fang <fr...@gmail.com>.
The request soap message sent by your client need be MTOM enabled
message (not the the base64binary code embeded inside soap body, but as
the attahment), I'm not sure how can you send MTOM message with your
SOAPUI (Honestly I'm not familiar with this tool, maybe it has this
feature, :-))
So take a look at [1], the wsdl need follow some rule, also you may
need write a cxf client configured as [1] to send out mtom message.
[1]http://cwiki.apache.org/CXF20DOC/mtom.html
Freeman
Richa Khurana wrote:
> Hello,
>
> I am using CXF in SMX. The problem i am facing is with the SOAP Request
> with attachments. I have already set the mtomEnabled variable on both
> CXF BC and CXF SE. Also, I was successfully able to generate the POJO's
>
> But the request that I am getting have the attachment (byte[]) as null.
>
> For reference, I have attached the wsdl, xbean.xml for CXF SE and BC
> components and the generated POJO's along with the class implementing
> the webmethod. I am using SOAP UI as client for sending the request to
> the exposed webmethod.
>
> Any pointers/help is highly appreciated.
>
> Thanks,
>
>
Facing problem in using CXF in SMX.
Posted by Richa Khurana <ri...@globallogic.com>.
Hello,
I am using CXF in SMX. The problem i am facing is with the SOAP Request
with attachments. I have already set the mtomEnabled variable on both
CXF BC and CXF SE. Also, I was successfully able to generate the POJO's
But the request that I am getting have the attachment (byte[]) as null.
For reference, I have attached the wsdl, xbean.xml for CXF SE and BC
components and the generated POJO's along with the class implementing
the webmethod. I am using SOAP UI as client for sending the request to
the exposed webmethod.
Any pointers/help is highly appreciated.
Thanks,
Re: saxon-xslt & for-each iterator
Posted by Guillaume Nodet <gn...@gmail.com>.
The soap envelope should not really be sent inside the NMR.
This may happen depending on your configuration of your BC though.
On Mon, Mar 23, 2009 at 10:32, brijesh <br...@gmail.com> wrote:
>
> JB,
>
> thanks for the input, I tried that also but no luck,
> but what i observed is , the xml file which is going into xslt tranformation
> has soap envelope tags. as given below
>
> <soap:Envelope
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><not:notifyEvent
> xmlns:not="http://www.ekaplus.com/NotifyEvent/">
> <in><catalog>
> <cd>
> <title>Empire Burlesque</title>
> <artist>Bob Dylan</artist>
> <country>USA</country>
> <company>Columbia</company>
> <price>10.90</price>
> <year>1985</year>
> </cd>
> <cd>
> <title>Hide your heart</title>
> <artist>Bonnie Tyler</artist>
> <country>UK</country>
> <company>CBS Records</company>
> <price>9.90</price>
> <year>1988</year>
> </cd>
> </catalog>
> </in>
> </not:notifyEvent></soap:Body></soap:Envelope>
>
> is it required to take care of soap tags also , while creating xslt or is
> there a way to remove the soap tag and pass only the payload to
> transformation ??
>
> thanks for the valuable input
>
> regards
>
> Brijesh N K
>
>
>
>
> Jean-Baptiste Onofré wrote:
>>
>> Hi,
>>
>> have you tried :
>>
>> <xsl:template match="catalog">
>> <test>
>> <xsl:apply-template/>
>> </test>
>> </xsl:template>
>> <xsl:template match="catalog/cd">
>> <cd>
>> <xsl:value-of select="title"/>
>> <xsl:value-of select="artist"/>
>> </cd>
>> </xsl:template>
>>
>> ?
>>
>> Regards
>> JB
>>
>> On Friday 20 March 2009 - 08:00, brijesh wrote:
>>>
>>> hello ,
>>>
>>> I have servicemix-saxon su with following xslt
>>>
>>> <?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="/">
>>> <test>
>>> <xsl:for-each select="catalog/cd">
>>> <cd>
>>> <xsl:value-of select="title"/>
>>> <xsl:value-of select="artist"/>
>>> </cd>
>>> </xsl:for-each>
>>> </test>
>>>
>>> </xsl:template></xsl:stylesheet>
>>>
>>> following is xbean configuration
>>>
>>> <beans xmlns:saxon="http://servicemix.apache.org/saxon/1.0"
>>> xmlns:nte="http://www.ekaplus.com/NotifyEvent/"
>>> xmlns="http://www.springframework.org/schema/beans"
>>> xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
>>> xsi:schemaLocation="http://servicemix.apache.org/saxon/1.0
>>> http://servicemix.apache.org/schema/servicemix-saxon-3.2.3.xsd
>>> http://www.springframework.org/schema/beans
>>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>>>
>>> <!-- START SNIPPET: xslt -->
>>> <saxon:xslt service="nte:transformToDoc"
>>> endpoint="nte:transformToDocEP"
>>> resource="classpath:transform.xsl" />
>>> <!-- END SNIPPET: xslt -->
>>>
>>> </beans>
>>>
>>> xml file as follows
>>>
>>> <catalog>
>>> <cd>
>>> <title>Empire Burlesque</title>
>>> <artist>Bob Dylan</artist>
>>> <country>USA</country>
>>> <company>Columbia</company>
>>> <price>10.90</price>
>>> <year>1985</year>
>>> </cd>
>>> <cd>
>>> <title>Hide your heart</title>
>>> <artist>Bonnie Tyler</artist>
>>> <country>UK</country>
>>> <company>CBS Records</company>
>>> <price>9.90</price>
>>> <year>1988</year>
>>> </cd>
>>> <cd>
>>> <title>Greatest Hits</title>
>>> <artist>Dolly Parton</artist>
>>> <country>USA</country>
>>> <company>RCA</company>
>>> <price>9.90</price>
>>> <year>1982</year>
>>> </cd>
>>> </catalog>
>>>
>>> I am getting the result as follows
>>>
>>>
>>> <test/>
>>>
>>> but my expected result was
>>>
>>> <test><cd>Empire BurlesqueBob Dylan</cd><cd>Hide your heartBonnie
>>> Tyler</cd><cd>Greatest HitsDolly Parton</cd></test>
>>>
>>>
>>> can anybody point out the mistake here , it seems that for-each xslt
>>> iterator is not working with saxon-xslt
>>>
>>>
>>> regards
>>>
>>> Brijesh N K
>>> --
>>> View this message in context:
>>> http://www.nabble.com/saxon-xslt---for-each-iterator-tp22621757p22621757.html
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/saxon-xslt---for-each-iterator-tp22621757p22656753.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>
--
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com
Re: saxon-xslt & for-each iterator
Posted by brijesh <br...@gmail.com>.
JB,
thanks for the input, I tried that also but no luck,
but what i observed is , the xml file which is going into xslt tranformation
has soap envelope tags. as given below
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><not:notifyEvent
xmlns:not="http://www.ekaplus.com/NotifyEvent/">
<in><catalog>
<cd>
<title>Empire Burlesque</title>
<artist>Bob Dylan</artist>
<country>USA</country>
<company>Columbia</company>
<price>10.90</price>
<year>1985</year>
</cd>
<cd>
<title>Hide your heart</title>
<artist>Bonnie Tyler</artist>
<country>UK</country>
<company>CBS Records</company>
<price>9.90</price>
<year>1988</year>
</cd>
</catalog>
</in>
</not:notifyEvent></soap:Body></soap:Envelope>
is it required to take care of soap tags also , while creating xslt or is
there a way to remove the soap tag and pass only the payload to
transformation ??
thanks for the valuable input
regards
Brijesh N K
Jean-Baptiste Onofré wrote:
>
> Hi,
>
> have you tried :
>
> <xsl:template match="catalog">
> <test>
> <xsl:apply-template/>
> </test>
> </xsl:template>
> <xsl:template match="catalog/cd">
> <cd>
> <xsl:value-of select="title"/>
> <xsl:value-of select="artist"/>
> </cd>
> </xsl:template>
>
> ?
>
> Regards
> JB
>
> On Friday 20 March 2009 - 08:00, brijesh wrote:
>>
>> hello ,
>>
>> I have servicemix-saxon su with following xslt
>>
>> <?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="/">
>> <test>
>> <xsl:for-each select="catalog/cd">
>> <cd>
>> <xsl:value-of select="title"/>
>> <xsl:value-of select="artist"/>
>> </cd>
>> </xsl:for-each>
>> </test>
>>
>> </xsl:template></xsl:stylesheet>
>>
>> following is xbean configuration
>>
>> <beans xmlns:saxon="http://servicemix.apache.org/saxon/1.0"
>> xmlns:nte="http://www.ekaplus.com/NotifyEvent/"
>> xmlns="http://www.springframework.org/schema/beans"
>> xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
>> xsi:schemaLocation="http://servicemix.apache.org/saxon/1.0
>> http://servicemix.apache.org/schema/servicemix-saxon-3.2.3.xsd
>> http://www.springframework.org/schema/beans
>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>>
>> <!-- START SNIPPET: xslt -->
>> <saxon:xslt service="nte:transformToDoc"
>> endpoint="nte:transformToDocEP"
>> resource="classpath:transform.xsl" />
>> <!-- END SNIPPET: xslt -->
>>
>> </beans>
>>
>> xml file as follows
>>
>> <catalog>
>> <cd>
>> <title>Empire Burlesque</title>
>> <artist>Bob Dylan</artist>
>> <country>USA</country>
>> <company>Columbia</company>
>> <price>10.90</price>
>> <year>1985</year>
>> </cd>
>> <cd>
>> <title>Hide your heart</title>
>> <artist>Bonnie Tyler</artist>
>> <country>UK</country>
>> <company>CBS Records</company>
>> <price>9.90</price>
>> <year>1988</year>
>> </cd>
>> <cd>
>> <title>Greatest Hits</title>
>> <artist>Dolly Parton</artist>
>> <country>USA</country>
>> <company>RCA</company>
>> <price>9.90</price>
>> <year>1982</year>
>> </cd>
>> </catalog>
>>
>> I am getting the result as follows
>>
>>
>> <test/>
>>
>> but my expected result was
>>
>> <test><cd>Empire BurlesqueBob Dylan</cd><cd>Hide your heartBonnie
>> Tyler</cd><cd>Greatest HitsDolly Parton</cd></test>
>>
>>
>> can anybody point out the mistake here , it seems that for-each xslt
>> iterator is not working with saxon-xslt
>>
>>
>> regards
>>
>> Brijesh N K
>> --
>> View this message in context:
>> http://www.nabble.com/saxon-xslt---for-each-iterator-tp22621757p22621757.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>
>
--
View this message in context: http://www.nabble.com/saxon-xslt---for-each-iterator-tp22621757p22656753.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: saxon-xslt & for-each iterator
Posted by jb...@nanthrax.net.
Hi,
have you tried :
<xsl:template match="catalog">
<test>
<xsl:apply-template/>
</test>
</xsl:template>
<xsl:template match="catalog/cd">
<cd>
<xsl:value-of select="title"/>
<xsl:value-of select="artist"/>
</cd>
</xsl:template>
?
Regards
JB
On Friday 20 March 2009 - 08:00, brijesh wrote:
>
> hello ,
>
> I have servicemix-saxon su with following xslt
>
> <?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="/">
> <test>
> <xsl:for-each select="catalog/cd">
> <cd>
> <xsl:value-of select="title"/>
> <xsl:value-of select="artist"/>
> </cd>
> </xsl:for-each>
> </test>
>
> </xsl:template></xsl:stylesheet>
>
> following is xbean configuration
>
> <beans xmlns:saxon="http://servicemix.apache.org/saxon/1.0"
> xmlns:nte="http://www.ekaplus.com/NotifyEvent/"
> xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://servicemix.apache.org/saxon/1.0
> http://servicemix.apache.org/schema/servicemix-saxon-3.2.3.xsd
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>
> <!-- START SNIPPET: xslt -->
> <saxon:xslt service="nte:transformToDoc" endpoint="nte:transformToDocEP"
> resource="classpath:transform.xsl" />
> <!-- END SNIPPET: xslt -->
>
> </beans>
>
> xml file as follows
>
> <catalog>
> <cd>
> <title>Empire Burlesque</title>
> <artist>Bob Dylan</artist>
> <country>USA</country>
> <company>Columbia</company>
> <price>10.90</price>
> <year>1985</year>
> </cd>
> <cd>
> <title>Hide your heart</title>
> <artist>Bonnie Tyler</artist>
> <country>UK</country>
> <company>CBS Records</company>
> <price>9.90</price>
> <year>1988</year>
> </cd>
> <cd>
> <title>Greatest Hits</title>
> <artist>Dolly Parton</artist>
> <country>USA</country>
> <company>RCA</company>
> <price>9.90</price>
> <year>1982</year>
> </cd>
> </catalog>
>
> I am getting the result as follows
>
>
> <test/>
>
> but my expected result was
>
> <test><cd>Empire BurlesqueBob Dylan</cd><cd>Hide your heartBonnie
> Tyler</cd><cd>Greatest HitsDolly Parton</cd></test>
>
>
> can anybody point out the mistake here , it seems that for-each xslt
> iterator is not working with saxon-xslt
>
>
> regards
>
> Brijesh N K
> --
> View this message in context: http://www.nabble.com/saxon-xslt---for-each-iterator-tp22621757p22621757.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
Re: saxon-xslt & for-each iterator
Posted by brijesh <br...@gmail.com>.
Any input for this?.
regards
Brijesh N K
brijesh wrote:
>
> hello ,
>
> I have servicemix-saxon su with following xslt
>
> <?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="/">
> <test>
> <xsl:for-each select="catalog/cd">
> <cd>
> <xsl:value-of select="title"/>
> <xsl:value-of select="artist"/>
> </cd>
> </xsl:for-each>
> </test>
>
> </xsl:template></xsl:stylesheet>
>
> following is xbean configuration
>
> <beans xmlns:saxon="http://servicemix.apache.org/saxon/1.0"
> xmlns:nte="http://www.ekaplus.com/NotifyEvent/"
> xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://servicemix.apache.org/saxon/1.0
> http://servicemix.apache.org/schema/servicemix-saxon-3.2.3.xsd
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>
> <!-- START SNIPPET: xslt -->
> <saxon:xslt service="nte:transformToDoc" endpoint="nte:transformToDocEP"
> resource="classpath:transform.xsl" />
> <!-- END SNIPPET: xslt -->
>
> </beans>
>
> xml file as follows
>
> <catalog>
> <cd>
> <title>Empire Burlesque</title>
> <artist>Bob Dylan</artist>
> <country>USA</country>
> <company>Columbia</company>
> <price>10.90</price>
> <year>1985</year>
> </cd>
> <cd>
> <title>Hide your heart</title>
> <artist>Bonnie Tyler</artist>
> <country>UK</country>
> <company>CBS Records</company>
> <price>9.90</price>
> <year>1988</year>
> </cd>
> <cd>
> <title>Greatest Hits</title>
> <artist>Dolly Parton</artist>
> <country>USA</country>
> <company>RCA</company>
> <price>9.90</price>
> <year>1982</year>
> </cd>
> </catalog>
>
> I am getting the result as follows
>
>
> <test/>
>
> but my expected result was
>
> <test><cd>Empire BurlesqueBob Dylan</cd><cd>Hide your heartBonnie
> Tyler</cd><cd>Greatest HitsDolly Parton</cd></test>
>
>
> can anybody point out the mistake here , it seems that for-each xslt
> iterator is not working with saxon-xslt
>
>
> regards
>
> Brijesh N K
>
--
View this message in context: http://www.nabble.com/saxon-xslt---for-each-iterator-tp22621757p22634503.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: saxon-xslt & for-each iterator
Posted by brijesh <br...@gmail.com>.
can anyboy give me an input on this???
my workflow as follows
cxf-bc-->eip-->saxon-->cxf-bc
regards
Brijesh N K
brijesh wrote:
>
> hello ,
>
> I have servicemix-saxon su with following xslt
>
> <?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="/">
> <test>
> <xsl:for-each select="catalog/cd">
> <cd>
> <xsl:value-of select="title"/>
> <xsl:value-of select="artist"/>
> </cd>
> </xsl:for-each>
> </test>
>
> </xsl:template></xsl:stylesheet>
>
> following is xbean configuration
>
> <beans xmlns:saxon="http://servicemix.apache.org/saxon/1.0"
> xmlns:nte="http://www.ekaplus.com/NotifyEvent/"
> xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://servicemix.apache.org/saxon/1.0
> http://servicemix.apache.org/schema/servicemix-saxon-3.2.3.xsd
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>
> <!-- START SNIPPET: xslt -->
> <saxon:xslt service="nte:transformToDoc" endpoint="nte:transformToDocEP"
> resource="classpath:transform.xsl" />
> <!-- END SNIPPET: xslt -->
>
> </beans>
>
> xml file as follows
>
> <catalog>
> <cd>
> <title>Empire Burlesque</title>
> <artist>Bob Dylan</artist>
> <country>USA</country>
> <company>Columbia</company>
> <price>10.90</price>
> <year>1985</year>
> </cd>
> <cd>
> <title>Hide your heart</title>
> <artist>Bonnie Tyler</artist>
> <country>UK</country>
> <company>CBS Records</company>
> <price>9.90</price>
> <year>1988</year>
> </cd>
> <cd>
> <title>Greatest Hits</title>
> <artist>Dolly Parton</artist>
> <country>USA</country>
> <company>RCA</company>
> <price>9.90</price>
> <year>1982</year>
> </cd>
> </catalog>
>
> I am getting the result as follows
>
>
> <test/>
>
> but my expected result was
>
> <test><cd>Empire BurlesqueBob Dylan</cd><cd>Hide your heartBonnie
> Tyler</cd><cd>Greatest HitsDolly Parton</cd></test>
>
>
> can anybody point out the mistake here , it seems that for-each xslt
> iterator is not working with saxon-xslt
>
>
> regards
>
> Brijesh N K
>
--
View this message in context: http://www.nabble.com/saxon-xslt---for-each-iterator-tp22621757p22655432.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.