OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

wsbpel message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [wsbpel] Issue 157 - XSLT and copy/replace semantics



Hi all,

I want to clarify that we should focus on the replacement semantics in 
<copy> first.

Let's park this XSLT discussion (as an addon feature attached to 
from-spec later) after we resolve Issue 157 by clarifying what 
replacment in <copy> means.

I am not sure the bandwidth of this TC can handle simultanous 
discussions on <copy>'s replacement semantics and XSLT as an add-on at 
the same time. Those non-full-time participants would simply got 
confused by two discussions.

Thanks!


Regards,
Alex Yiu


Charlton Barreto wrote:

> Hi all,
>
> Below is a proposal which pulls together several ideas on using XSLT  
> to perform <copy> - thanks to Alex, Ron and Ugo for the input they  
> provided into this.
>
>> On reviewing this issue I would like to propose that we adopt the  
>> use of XSLT functionality to perform <copy>. This would involve  
>> using said XSLT functionality in <from>. Note that this is  different 
>> from my understanding of Assaf and Yuzo's original  proposal/thoughts 
>> which would use this functionality in <to>.
>>
>> By using XSLT functionality in the <copy> from-spec, we accomplish  
>> the economy of defining the copy/replace semantics which is  
>> generating the greatest churn with respect to fully defining the  
>> current copy concept. This XSLT functionality provides a rich set  of 
>> copy/replace semantics which in this context can be used to  achieve 
>> the same results as the current copy concept while  addressing the 
>> lingering questions in the current concept and  providing semantic 
>> simplification. At the same time, current copy  functionality is 
>> maintained.
>>
>> The idea is that we essentially replace the original source tree  
>> with the new tree created by the XSLT transform. This covers both  
>> copy/replace as follows:
>> 1) The result is semantically a new tree, where the original source  
>> tree distinctly existed.
>> 2) The result tree is semantically a modification of the original  
>> source tree, where the result tree replaces the original.
>>
>> This achieves the same as the current copy concept, but delegating  
>> the responsibility to XSLT functionality. To use this, we would  have 
>> to assign a stylesheet to the from-spec in order to associate  it 
>> with the copy/replace.
>>
>> To illustrate, let's take Yuzo and Ugo's example:
>>
>> var1:
>> <invoice test="false">
>>         <invoiceNumber>9876</invoiceNumber>
>>         <orderNumber>0000</orderNumber>
>>         <amount/>
>>         <billingAddress><street/></billingAddress>
>> </invoice>
>>
>> Lets assume we wish to modify this variable as follows:
>>
>> <invoice test="false">
>>         <invoiceNumber>9876</invoiceNumber>
>>         <orderNumber>1234</orderNumber>
>>         <amount/>
>>         <billingAddress><street>1
>> Somewhere</street><state>SW</state></billingAddress>
>> </invoice>
>>
>> We would use XSLT as follows:
>>
>> Stylesheet:
>> <xsl:stylesheet version="1.0"
>>     xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
>>
>>     <xsl:template match="orderNumber">
>>         <xsl:element name="orderNumber">
>>             <xsl:value-of select="1234"/>
>>         </xsl:element>
>>     </xsl:template>
>>
>>     <xsl:template match="billingAddress">
>>         <xsl:element name="billingAddress">
>>             <xsl:copy-of select= ... node corresponding to
>> "<billingAddress><street>1
>> Somewhere</street><state>SW</state></billingAddress>" ... />
>>         </xsl:element>
>>     </xsl:template>
>>
>>     <xsl:template match="@*|node()">
>>         <xsl:copy>
>>             <xsl:apply-templates select="@*|node()"/>
>>         </xsl:copy>
>>
>>     </xsl:template>
>>
>> </xsl:stylesheet>
>>
>> Applying the XSLT transform to the tree contained in var1 (i.e.  
>> tree1) to produce tree2, we would then replace the contents of var1  
>> with tree2 This achieves XSLT-based copy - var1's contents are the  
>> same as if we had used the copy operations based on the current  
>> concept. This achieves the same copy/replace semantics of the  
>> current concept without violating XSLT semantics of XSLT  
>> transformations (i.e. no modification of tree1). This is how the  
>> source tree is "modified" while generating a distinct result tree.
>
>
> Please provide any feedback you may have on this.
>
> Cheers,
>
> -Charlton.
>
> Charlton Barreto
> P 1.408.536.4496
> cbarreto@adobe.com
> www.adobe.com
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this mail list, you must leave the OASIS TC that
> generates this mail.  You may a link to this group and all your TCs in 
> OASIS
> at:
> https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php





[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]