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

 


Help: OASIS Mailing Lists Help | MarkMail Help

ebxml-dev message

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


Subject: RE: [ebxml-dev] resolving xpath expressions in bpss


There is no mechanism in XSLT to evaluate an XPath expression that's
constructed dynamically from a string or read from a source document; it
will only evaluate XPath expressions hard-coded in the stylesheet.
<xsl:value-of>, when applied to a node, returns the string value of that
node, it doesn't know that the string is supposed to contain an XPath
expression.

There's an extension function xx:evaluate() that does this in certain
products, for example Saxon and Xalan.

We were thinking of adding this feature to XSLT 2.0 but there were some
problems: some implementations find it means they have to carry much more
context information at run-time. Also, it's hard to define how namespace
prefixes should be resolved.

If it's a standard document type that's using XPath expressions in the
content, then I'd be interested to know more about the requirement - or you
could send it to public-qt-comments@w3.org which is the address for comments
on the XSLT 2.0 drafts.

Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com

> -----Original Message-----
> From: Boreham, Rob [mailto:Rob_Boreham@hplb.hpl.hp.com]
> Sent: 02 May 2002 11:08
> To: 'ebxml-dev@lists.ebxml.org'
> Subject: RE: [ebxml-dev] resolving xpath expressions in bpss
>
>
> Hi Jean-Jacques,
>
> I don't have a firm example to test as yet (any one know
> where I can get an example of a valid bpss that uses
> xpath expressions?)
>
> However, I tried with the following simple example:
> XML:-
> <?xml version="1.0" encoding="UTF-8"?>
> <?xml-stylesheet type="text/xsl" href="simple.chuck.xsl"?>
> <simple>
>    <part name="part one">
>       <text>Some pre-amble, </text>
>       <parameter name="paraName"
>                  value="the real value" />
>    </part>
>    <part name="part two">
>       <text>more stuff, </text>
>       <parameter name="paraName"
>                  value="//part[@name='part one']/parameter/@value" />
>    </part>
> </simple>
>
> XSL:-
> <?xml version="1.0" encoding="ISO-8859-1"?>
>  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
> version="1.0">
>  <xsl:template match="/">
>    <xsl:apply-templates />
>  </xsl:template>
>    <xsl:template match="/simple" >
>    <xsl:for-each select="part">
>      <xsl:value-of select="./text/text()" />
>      <xsl:value-of select="./parameter/@value" />
>    <br></br>
>    </xsl:for-each>
>  </xsl:template>
> </xsl:stylesheet>
>
> OUTPUT:-
> Some pre-amble, the real value
> more stuff, //part[@name='part one']/parameter/@value
>
> But I realy want:
> Some pre-amble, the real value
> more stuff, the real value
>
> Can anyone help?
>
> Regards
> Rob
>
> -----Original Message-----
> From: Jean-Jacques Dubray [mailto:jjd@eigner.com]
> Sent: Wednesday, May 01, 2002 4:04 PM
> To: 'Boreham, Rob'
> Subject: RE: [ebxml-dev] resolving xpath expressions in bpss
>
>
> Rob:
>
> As it is a regular Xpath expression, I don't see why they would not
> yield the correct result processed within a stylesheet?
>
> Are you experiencing some problem?
>
> Jean-Jacques
>  
>
>
> >>-----Original Message-----
> >>From: Boreham, Rob [mailto:Rob_Boreham@hplb.hpl.hp.com]
> >>Sent: Wednesday, May 01, 2002 9:53 AM
> >>To: 'ebxml-dev@lists.ebxml.org'
> >>Subject: [ebxml-dev] resolving xpath expressions in bpss
> >>
> >>Hi
> >>
> >>Can anyone tell me if it is possible to resolve the xpath
> expressions
> used
> >>in BPSS with XSLT.
> >>
> >>eg -from ebBPSS.pdf-
> >>
> >><Package name="ebXMLOrdering">
> >>  <BinaryCollaboration name="OrderCollaboration" nameID="b112">
> >>    <InitiatingRole name="buyer" nameID="r224"/>
> >>    <RespondingRole name="seller" nameID="r225"/>
> >>  </BinaryCollaboration>
> >></Package>
> >><!-the XPath approach -->
> >><Performs
> >>initiatingRole='//Package[@name="ebXMLOrdering"]/BinaryColla
> boration[@
> name
> >>="
> >>OrderCollaboration"]/InitiatingRole[@name="buyer"]'/>
> >>
> >>What I want, is to be able to take any valid BPSS spec [in XML] and
> render
> >>it in a browser via XSL Transfrom
> >>
> >>Hope some one can help
> >>
> >>Regards
> >>Rob
> >>
> >>----------------------------------------------------------------
> >>The ebxml-dev list is sponsored by OASIS.
> >>To subscribe or unsubscribe from this elist use the subscription
> >>manager: <http://lists.ebxml.org/ob/adm.pl>
>
>
> ----------------------------------------------------------------
> The ebxml-dev list is sponsored by OASIS.
> To subscribe or unsubscribe from this elist use the subscription
> manager: <http://lists.ebxml.org/ob/adm.pl>
>



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

Search: Match: Sort by:
Words: | Help


Powered by eList eXpress LLC