Latest Posts


Show last 6 hrs - 24 hrs - 7 days

Forum tags


Top Posters

Last 30 days

  • Antoine (87)
  • talita.pezzi (26)
  • ravinderjit.singh (14)
  • sundaravadivel.n (14)
  • leonardo.saraiva (12)
  • deepa.tekumalla (12)
  • clarissa.domingues.rocha1 (11)
  • jose.mendoza (9)
  • alfons.bataller.diaz (8)
  • eduardo.lawisch (8)

All time

  • Antoine (1440)
  • Shivanand (1189)
  • cshekhar (923)
  • psq (796)
  • jag (391)
  • metabyte (371)
  • arnaud (327)
  • jalateras (325)
  • dfrench (265)
  • venkaiah.k (198)

Show last 4 hrs - 12 hrs - 24 hrs

POLL

We are looking for more information to tailor our training to better meet the needs of our customers. Please indicate all options that apply.

I would like to attend specialized training from Intalio on BPM as it relates to my application area:


I would like to attend specialized training from Intalio on BPM as it relates to my job function:


I would like to attend specialized training from Intalio on BPM as it relates to my industry:

Login

MAIN arrow FORUMS
Re:doXslTransform() (0 viewing) 
Go to bottom Post Reply Favoured: 0
TOPIC: Re:doXslTransform()
#9276
dfrench (User)
Gold Boarder
User Offline Click here to see the profile of this user
Re:doXslTransform() 1 Year, 1 Month ago Karma: 8  
Antoine,
DoXslTransform() looks definitely broken to me. It has a side-effect on the output node, causing an existing prefix to be dropped resulting in subsequent XPATH references to the node to mismatch.
Is there a work-around for this?
Is it a known issue?

The input document, from the default client, is

<query.Response xmlns="http://intalio.com/connectors/jdbc" xmlns:ns1="http://intalio.com/connectors/jdbc" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<rows>
<row>
<label>lab 1</label>
<value>val 1</value>
</row>
<row>
<label>lab 2</label>
<value>val 11</value>
</row>
</rows>
</query.Response>

The transform acting on this input document is intended to simply rewrite the 'rows' node as 'items'

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ns1="http://intalio.com/connectors/jdbc" xmlns:form2="http://example.com/form2/xform" xmlns="http://example.com/form2/xform"
>
<xsl:output method="xml"/>
<xsl:template match="ns1:rows">
<xsl:element name="root" namespace="http://example.com/form2/xform" >
<form2:items>
<xsl:for-each select="ns1:row">
<form2:item>
<form2:label>
<xsl:value-of select="ns1:label"/>
</form2:label>
<form2:value>
<xsl:value-of select="ns1:value"/>
</form2:value>
</form2:item>
</xsl:for-each>
</form2:items>
</xsl:element>
</xsl:template>
</xsl:stylesheet>

In the mapper, the output of the doXslTransform() function is wired to the node containing 'rows' resulting a BPEL assign .

<bpel:assign bpmn:label="transform" bpmn:id="_sqAlkHqjEdy4boMa16EGGA">
<bpel:copy>
<bpel:from>bpel:doXslTransform("urn:/transform.xsl", $doXSLTramsform1.body/MYSQLDB:rows)</bpel:from>
<bpel:to>$doXSLTransform1_Response.body/xform:seletpets_items</bpel:to>
</bpel:copy>
</bpel:assign>

On execution of the process, the output message after the transform looks like this

<input xmlns="http://example.com/form2/xform" xmlns:xform="http://example.com/form2/xform">
<xform:seletpets />
<seletpets_items>
<form2:items xmlns:ns1="http://intalio.com/connectors/jdbc" xmlns:form2="http://example.com/form2/xform">
<form2:item>
<form2:label>lab 1</form2:label>
<form2:value>val 1</form2:value>
</form2:item>
<form2:item>
<form2:label>lab 2</form2:label>
<form2:value>val 11</form2:value>
</form2:item>
</form2:items>
</seletpets_items>
<xform:pagroup>
<xform:Result1 />
<xform:Result2 />
</xform:pagroup>
</input>

Note that seletpets_items has lost its prefix in the transform. My understanding is that the root node from the transform should be dropped and the target node contents only replaced.
 
Report to moderator   Logged Logged  
 
Last Edit: 2007/10/17 20:44 By dfrench.
  The administrator has disabled public write access.
#9279
Antoine (Admin)
Admin
User Offline Click here to see the profile of this user
Re:doXslTransform() 1 Year, 1 Month ago Karma: 26  
Hi David,

we will investigate.

Thanks,

Antoine
 
Report to moderator   Logged Logged  
 
Intalio, the Open Source BPMS company
www.intalio.com
  The administrator has disabled public write access.
#9281
mriou (User)
Fresh Boarder
User Offline Click here to see the profile of this user
Re:doXslTransform() 1 Year, 1 Month ago Karma: 0  
Hi,

If you look at the first elements of your result document, the 'input' element has a default namespace declaration and it's identical to the one associated with the xform prefix. So even though your 'seletpets_items' element has no prefix, it's in the right namespace, there's nothing wrong about it.

Your subsequent assignment is probably failing for another reason. As far as namespaces are concerned, the result looks fine to me.

Cheers,
Matthieu
 
Report to moderator   Logged Logged  
 
Last Edit: 2007/10/17 21:16 By mriou.
  The administrator has disabled public write access.
#9291
dfrench (User)
Gold Boarder
User Offline Click here to see the profile of this user
Re:doXslTransform() 1 Year, 1 Month ago Karma: 8  
Thanks Matthieu, ***SOLVED***
It just looked odd to me and distracted me from the extra 'items' element I output from the transform. All this to get the select and select1 initialised from a database!

David
 
Report to moderator   Logged Logged  
 
Last Edit: 2007/10/18 09:06 By dfrench.
  The administrator has disabled public write access.
Go to top Post Reply
get the latest posts directly to your desktop