[www-voice] <none>

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[www-voice] <none>

Jon Kerny
Hi,

I've been looking at test354.txml in the scxml irp. For xpath it makes use of a template implemented like this:

<xsl:template match="//@conf:eventDataNamelistValue">
<xsl:attribute name="expr">
$_event/data/data[@id='Var
<xsl:value-of select="."/>
']/data/text()
</xsl:attribute>
</xsl:template>

It creates an expression like this:

expr="$_event/data/data[@id='Var1']/data/text()" 

I don't understand why there should be three levels of data?

The first is from event, ok.
The second is from 2.7.1 in the xpath specification, ok

But why is there a third data element?

Why isn't a template below used?

<xsl:template match="//@conf:eventDataNamelistValue">
<xsl:attribute name="expr">
$_event/data/data[@id='Var
<xsl:value-of select="."/>
']/text()
</xsl:attribute>
</xsl:template>

Where in the specifications does it say that there should be a event/data/data[@id='']/data/ structure when using xpath?

For ecmascript the template looks like:

<xsl:template match="//@conf:eventDataNamelistValue">
<xsl:attribute name="expr">
_event.data.Var
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:template>

I cannot understand why there is a difference.

Best regards,

Jon


Reply | Threaded
Open this post in threaded view
|

Re: [www-voice] <none>

Jim Barnett

Jon,

  One of the main reasons that the XPath data model was removed from the final draft of the specification was because there wasn't agreement on the underlying data structures.   In particular, the wasn't agreement on what XPath XSLT file should produce as output.   As a result, the existing XSLT file for Xpath is just a first cut that was never completed.  If you are working on an XPath data model for SCXML, you should define the data structures as you see fit and produce your own XSLT transformations. 

- Jim

On 5/1/2016 5:02 PM, Jon Kerny wrote:
Hi,

I've been looking at test354.txml in the scxml irp. For xpath it makes use of a template implemented like this:

<xsl:template match="//@<a class="moz-txt-link-freetext" href="conf:eventDataNamelistValue">conf:eventDataNamelistValue">
<xsl:attribute name="expr">
$_event/data/data[@id='Var
<xsl:value-of select="."/>
']/data/text()
</xsl:attribute>
</xsl:template>

It creates an expression like this:

expr="$_event/data/data[@id='Var1']/data/text()" 

I don't understand why there should be three levels of data?

The first is from event, ok.
The second is from 2.7.1 in the xpath specification, ok

But why is there a third data element?

Why isn't a template below used?

<xsl:template match="//@<a class="moz-txt-link-freetext" href="conf:eventDataNamelistValue">conf:eventDataNamelistValue">
<xsl:attribute name="expr">
$_event/data/data[@id='Var
<xsl:value-of select="."/>
']/text()
</xsl:attribute>
</xsl:template>

Where in the specifications does it say that there should be a event/data/data[@id='']/data/ structure when using xpath?

For ecmascript the template looks like:

<xsl:template match="//@<a class="moz-txt-link-freetext" href="conf:eventDataNamelistValue">conf:eventDataNamelistValue">
<xsl:attribute name="expr">
_event.data.Var
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:template>

I cannot understand why there is a difference.

Best regards,

Jon



Reply | Threaded
Open this post in threaded view
|

Re: [www-voice] <none>

Jon Kerny
Hi Jim,

I see that I haven't read the information, I made the assumtion that https://www.w3.org/TR/scxml-xpath-dm/ was still worked on. I have a mostly working implementation of both the ecmascript and xpath data models, 354 is one of a handful tests that currently doesn't pass.

On the topic of 354 I think that the xpath should be event/data/data[@id='']/ and not event/data/data[@id='']/data/.

thanks for the good work,

Jon

On Tue, May 3, 2016 at 6:55 PM, Jim Barnett <[hidden email]> wrote:

Jon,

  One of the main reasons that the XPath data model was removed from the final draft of the specification was because there wasn't agreement on the underlying data structures.   In particular, the wasn't agreement on what XPath XSLT file should produce as output.   As a result, the existing XSLT file for Xpath is just a first cut that was never completed.  If you are working on an XPath data model for SCXML, you should define the data structures as you see fit and produce your own XSLT transformations. 

- Jim

On 5/1/2016 5:02 PM, Jon Kerny wrote:
Hi,

I've been looking at test354.txml in the scxml irp. For xpath it makes use of a template implemented like this:

<xsl:template match="//@conf:eventDataNamelistValue">
<xsl:attribute name="expr">
$_event/data/data[@id='Var
<xsl:value-of select="."/>
']/data/text()
</xsl:attribute>
</xsl:template>

It creates an expression like this:

expr="$_event/data/data[@id='Var1']/data/text()" 

I don't understand why there should be three levels of data?

The first is from event, ok.
The second is from 2.7.1 in the xpath specification, ok

But why is there a third data element?

Why isn't a template below used?

<xsl:template match="//@conf:eventDataNamelistValue">
<xsl:attribute name="expr">
$_event/data/data[@id='Var
<xsl:value-of select="."/>
']/text()
</xsl:attribute>
</xsl:template>

Where in the specifications does it say that there should be a event/data/data[@id='']/data/ structure when using xpath?

For ecmascript the template looks like:

<xsl:template match="//@conf:eventDataNamelistValue">
<xsl:attribute name="expr">
_event.data.Var
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:template>

I cannot understand why there is a difference.

Best regards,

Jon