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

 


Help: OASIS Mailing Lists Help | MarkMail Help

sca-policy message

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


Subject: Re: [sca-policy] Can we use appliesTo="sca:binding" or appliesTo="sca:implementation"to select all bindings or implementations?


I looked at the Schema.  There is a Substitution Group headed by 
sca:binding.
sca:binding.ws, sca:binding.jms etc. are all members of the Substitution 
Group.
It is true that you cannot say //sca:binding and get all types of bindings.
But is that a problem?   With XPath 1.1 you always search for a specific 
binding/implementation.
All the best, Ashok


ashok malhotra wrote:
> Sorry, I misunderstood.
> If you say "sca:binding.ws", XPath 1.0 will only  find  sca:binding.ws 
> nodes.
> Not being Schema-aware it knows nothing about  substitution groups,
> nor for that matter, derived types.
>
> Seems like we need to file another issue.  But let me look at the 
> Schema again.
> All the best, Ashok
>
>
> Raymond Feng wrote:
>> I understand the relative path. But my question was if sca:binding 
>> can select elements such as sca:binding.ws in the substitutionGroup. 
>> In the composite files, we only use elements like binding.ws, 
>> implementation.java as the binding or implementation base element is 
>> abstract.
>>
>> Thanks,
>> Raymond
>> ------------------------------------------------------------------------
>> *Raymond Feng*
>> Senior Software Engineer, Apache Tuscany PMC Member & Committer
>> /IBM Bay Area Lab, 1001 E Hillsdale Blvd, Suite 400, Foster City, CA 
>> 94404, USA*
>> E-mail*//: //_rfeng@us.ibm.com_/ <mailto:rfeng@us.ibm.com>/, 
>> *Notes*//: Raymond Feng/Burlingame/IBM, *Tel*//: 650-645-8117, 
>> *T/L*//: 367-8117*
>> Apache Tuscany*//: //_http://tuscany.apache.org_/ 
>> <http://tuscany.apache.org/>/
>> Co-author of Tuscany In Action: //_http://www.manning.com/laws_// /
>> ------------------------------------------------------------------------
>>
>>
>> ashok malhotra <ashok.malhotra@oracle.com> wrote on 09/17/2009 
>> 02:50:50 PM:
>>
>> > From:
>> >
>> > ashok malhotra <ashok.malhotra@oracle.com>
>> >
>> > To:
>> >
>> > Raymond Feng/Burlingame/IBM@IBMUS
>> >
>> > Cc:
>> >
>> > sca-policy@lists.oasis-open.org
>> >
>> > Date:
>> >
>> > 09/17/2009 02:52 PM
>> >
>> > Subject:
>> >
>> > Re: [sca-policy] Can we use appliesTo="sca:binding" or
>> > appliesTo="sca:implementation" to select all bindings or 
>> implementations?
>> >
>> > Hi Raymond:
>> > In XPath 1.0 the expression "sca:binding.ws" will select all nodes
>> > called sca:binding that are children of the
>> > context node.
>> >
>> > Look in the section 2.5 of the spec.  The first bullet says:
>> >
>> >     * |para| selects the |para| element children of the context node
>> >
>> > All the best, Ashok
>> >
>> >
>> > Raymond Feng wrote:
>> > > There is a statement in the SCA Policy Framework Version 1.1,
>> > > Committee Draft 02/Public Review 01 – rev4 spec as quoted below:
>> > >
>> > > 337 • @appliesTo (0..1) - a string which is an XPath 1.0 expression
>> > > identifying one or more SCA constructs
>> > > 338 this policySet can configure. The contents of @appliesTo MUST
>> > > match the XPath 1.0 [XPATH]
>> > > 339 production /Expr. /[POL30018]
>> > >
>> > > We have the following samples as we expect them would select the
>> > > concrete bindings or implementations such as binding.ws or
>> > > implementation.java:
>> > > appliesTo="sca:binding"
>> > > appliesTo="sca:implementation"
>> > >
>> > > Unfortunately such capability is only available in XPath 2.0 where
>> > > schema-element() function can be used to test the substitutionGroup.
>> > > See section 2.5.4.4 Schema Element Test of
>> > > http://www.w3.org/TR/xpath20/. I'm not sure if there are XPath
>> > > implementations that support 2.0. At lease the one from JDK only
>> > > supports 1.0.
>> > >
>> > > Are these usages valid? Do we always have to give the concrete
>> > > elements such as appliesTo="//sca:binding.ws | //sca:binding.jms"?
>> > >
>> > > Thanks,
>> > > Raymond
>> > > 
>> ------------------------------------------------------------------------
>> > > *Raymond Feng*
>> > > Senior Software Engineer, Apache Tuscany PMC Member & Committer
>> > > /IBM Bay Area Lab, 1001 E Hillsdale Blvd, Suite 400, Foster City, CA
>> > > 94404, USA*
>> > > E-mail*//: //_rfeng@us.ibm.com_/ <mailto:rfeng@us.ibm.com>/,
>> > > *Notes*//: Raymond Feng/Burlingame/IBM, *Tel*//: 650-645-8117,
>> > > *T/L*//: 367-8117*
>> > > Apache Tuscany*//: //_http://tuscany.apache.org_/
>> > > <http://tuscany.apache.org/>/
>> > > Co-author of Tuscany In Action: //_http://www.manning.com/laws_// /
>> > > 
>> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe from this mail list, you must leave the OASIS TC that
> generates this mail.  Follow this link to 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]