Re: <none>
Jon Kerny <[email protected]> Wed, 4 May 2016 21:54:50 +0200
| Newsgroups | gmane.comp.web.voice |
|---|---|
| Message-ID | <CAC5YMgHyVReB6Fo2iMWjiR08Udb7qx24xayUMgKqch8oWPynBQ@mail.gmail.com> |
--001a114c7cf2417d710532099927 Content-Type: text/plain; charset=UTF-8 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 <[email protected]> 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 > <https://www.w3.org/Voice/2013/scxml-irp/354/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 > > > > --001a114c7cf2417d710532099927 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Hi Jim,<div><br></div><div>I see that I haven't read t= he information, I made the assumtion that=C2=A0<a href=3D"https://www.w3.or= g/TR/scxml-xpath-dm/">https://www.w3.org/TR/scxml-xpath-dm/</a> was still w= orked 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.</div><div><br></div><div>On the topic of 354 I think that the xpath= should be=C2=A0<span style=3D"font-family:monospace;font-size:13px">event/= data/data[@id=3D'']/ and not=C2=A0</span><span style=3D"font-family= :monospace;font-size:13px">event/data/data[@id=3D'']/data/.</span><= /div><div><br></div><div>thanks for the good work,</div><div><br></div><div= >Jon</div></div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">O= n Tue, May 3, 2016 at 6:55 PM, Jim Barnett <span dir=3D"ltr"><<a href=3D= "mailto:[email protected]" target=3D"_blank">[email protected]</a>>= ;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 = .8ex;border-left:1px #ccc solid;padding-left:1ex"> =20 =20 =20 <div bgcolor=3D"#FFFFFF" text=3D"#000000"> <p>Jon,</p> <p>=C2=A0 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.=C2=A0=C2=A0 In particula= r, the wasn't agreement on what XPath XSLT file should produce as output.=C2=A0=C2=A0 As a result, the existing XSLT file for Xpath is = just a first cut that was never completed.=C2=A0 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.=C2=A0 <br><= span class=3D"HOEnZb"><font color=3D"#888888"> </font></span></p><span class=3D"HOEnZb"><font color=3D"#888888"> <p>- Jim<br> </p></font></span><div><div class=3D"h5"> <div>On 5/1/2016 5:02 PM, Jon Kerny wrote:<br> </div> <blockquote type=3D"cite"> <div dir=3D"ltr"> <div>Hi,</div> <div><br> </div> <div>I've been looking at <a href=3D"https://www.w3.org/Voice/2= 013/scxml-irp/354/test354.txml" style=3D"color:rgb(85,34,153);font-family:s= ans-serif;font-size:medium;background:transparent" target=3D"_blank">test35= 4.txml</a>=C2=A0in the scxml irp. For xpath it makes use of a template implemented like this:</div> <div><br> </div> <div> <div style=3D"color:rgb(0,0,0);font-family:monospace;font-size:13= px"><span><xsl:template<span>=C2=A0<span>match</span>=3D"<span>//@<= a>conf:eventDataNamelistValue</a></span>"</span>></span></div> <div style=3D"margin-left:1em;color:rgb(0,0,0);font-family:monosp= ace;font-size:13px"><span></span> <div> <div> <div><span style=3D"display:inline-block;width:10px;vertica= l-align:bottom;min-height:10px;background:url("")"></span><span>&= lt;xsl:attribute<span>=C2=A0<span>name</span>=3D"<span>expr</span>&quo= t;</span>></span></div> <div style=3D"margin-left:1em"><span>$_event/data/data[@id= =3D'Var</span> <div><span><xsl:value-of<span>=C2=A0<span>select</span= >=3D"<span>.</span>"</span>/></span></div> <span>']/data/text()</span></div> <div><span></xsl:attribute></span></div> </div> </div> <span></span></div> <div style=3D"color:rgb(0,0,0);font-family:monospace;font-size:13= px"><span></xsl:template></span></div> </div> <div style=3D"color:rgb(0,0,0);font-family:monospace;font-size:13px= "><span><br> </span></div> <div style=3D"color:rgb(0,0,0);font-family:monospace;font-size:13px= "><span>It creates an expression like this:</span></div> <div style=3D"color:rgb(0,0,0);font-family:monospace;font-size:13px= "><span><br> </span></div> <div><span><font face=3D"monospace" color=3D"#000000">expr=3D"= $_event/data/data[@id=3D'Var1']/data/text()"=C2=A0</font><br> </span></div> <div><span><font face=3D"monospace" color=3D"#000000"><br> </font></span></div> <div><span><font face=3D"monospace" color=3D"#000000">I don't u= nderstand why there should be three levels of data?</font></span></div> <div><span><font face=3D"monospace" color=3D"#000000"><br> </font></span></div> <div><span><font face=3D"monospace" color=3D"#000000">The first is = from event, ok.</font></span></div> <div><span><font face=3D"monospace" color=3D"#000000">The second is= from 2.7.1 in the xpath specification, ok</font></span></div> <div><span><font face=3D"monospace" color=3D"#000000"><br> </font></span></div> <div><span><font face=3D"monospace" color=3D"#000000">But why is th= ere a third data element?</font></span></div> <div><span><font face=3D"monospace" color=3D"#000000"><br> </font></span></div> <div><span><font face=3D"monospace" color=3D"#000000">Why isn't= a template below used?</font></span></div> <div><span><font face=3D"monospace" color=3D"#000000"><br> </font></span></div> <div><span> <div style=3D"color:rgb(0,0,0);font-family:monospace;font-size:= 13px"> <div><span><xsl:template<span>=C2=A0<span>match</span>=3D&= quot;<span>//@<a>conf:eventDataNamelistValue</a></span>"</span>></s= pan></div> <div style=3D"margin-left:1em"><span></span> <div> <div> <div><span style=3D"display:inline-block;width:10px;ver= tical-align:bottom;min-height:10px;background:url("")"></span><sp= an><xsl:attribute<span>=C2=A0<span>name</span>=3D"<span>expr</span>= "</span>></span></div> <div style=3D"margin-left:1em"><span>$_event/data/data[= @id=3D'Var</span> <div><span><xsl:value-of<span>=C2=A0<span>select</= span>=3D"<span>.</span>"</span>/></span></div> <span>']/text()</span></div> <div><span></xsl:attribute></span></div> </div> </div> <span></span></div> <div><span></xsl:template></span></div> </div> <div style=3D"color:rgb(0,0,0);font-family:monospace;font-size:= 13px"><span><br> </span></div> <div style=3D"color:rgb(0,0,0);font-family:monospace;font-size:= 13px"><span>Where in the specifications does it say that there should be a event/data/data[@id=3D'']/data/ structure when using xpath?</span></div> <div style=3D"color:rgb(0,0,0);font-family:monospace;font-size:= 13px"><span><br> </span></div> <div style=3D"color:rgb(0,0,0);font-family:monospace;font-size:= 13px"><span>For ecmascript the template looks like:</span></div> <div style=3D"color:rgb(0,0,0);font-family:monospace;font-size:= 13px"><span><br> </span></div> <div style=3D"color:rgb(0,0,0);font-family:monospace;font-size:= 13px"><span> <div><span><xsl:template<span>=C2=A0<span>match</span>= =3D"<span>//@<a>conf:eventDataNamelistValue</a></span>"</span>>= ;</span></div> <div style=3D"margin-left:1em"><span></span> <div> <div> <div><span style=3D"display:inline-block;width:10px;v= ertical-align:bottom;min-height:10px;background:url("")"></span><= span><xsl:attribute<span>=C2=A0<span>name</span>=3D"<span>expr</spa= n>"</span>></span></div> <div style=3D"margin-left:1em"><span>_event.data.Var<= /span> <div><span><xsl:value-of<span>=C2=A0<span>select= </span>=3D"<span>.</span>"</span>/></span></div> </div> <div><span></xsl:attribute></span></div> </div> </div> <span></span></div> <div><span></xsl:template></span></div> <div><br> </div> <div>I cannot understand why there is a difference.</div> </span></div> <div style=3D"color:rgb(0,0,0);font-family:monospace;font-size:= 13px"><span><br> </span></div> <div style=3D"color:rgb(0,0,0);font-family:monospace;font-size:= 13px"><span>Best regards,</span></div> <div style=3D"color:rgb(0,0,0);font-family:monospace;font-size:= 13px"><span><br> </span></div> <div style=3D"color:rgb(0,0,0);font-family:monospace;font-size:= 13px"><span>Jon</span></div> <div style=3D"color:rgb(0,0,0);font-family:monospace;font-size:= 13px"><br> </div> </span></div> <div><span><font face=3D"monospace" color=3D"#000000"><br> </font></span></div> </div> </blockquote> <br> </div></div></div> </blockquote></div><br></div> --001a114c7cf2417d710532099927--