Re: <none>

Jim Barnett <[email protected]> Tue, 3 May 2016 12:55:52 -0400
Newsgroups gmane.comp.web.voice
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------EAB48A61194A5DAD38DA330A
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

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:templatematch="//@conf:eventDataNamelistValue">
> <xsl:attributename="expr">
> $_event/data/data[@id='Var
> <xsl:value-ofselect="."/>
> ']/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:templatematch="//@conf:eventDataNamelistValue">
> <xsl:attributename="expr">
> $_event/data/data[@id='Var
> <xsl:value-ofselect="."/>
> ']/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:templatematch="//@conf:eventDataNamelistValue">
> <xsl:attributename="expr">
> _event.data.Var
> <xsl:value-ofselect="."/>
> </xsl:attribute>
> </xsl:template>
>
> I cannot understand why there is a difference.
>
> Best regards,
>
> Jon
>
>


--------------EAB48A61194A5DAD38DA330A
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit

<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Jon,</p>
    <p>  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.  <br>
    </p>
    <p>- Jim<br>
    </p>
    <div class="moz-cite-prefix">On 5/1/2016 5:02 PM, Jon Kerny wrote:<br>
    </div>
    <blockquote
cite="mid:CAC5YMgHJ_N1gjMk8_nVrQ0gtwUOUsM+5zhBir2P12BffusKj5A@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>Hi,</div>
        <div><br>
        </div>
        <div>I've been looking at <a moz-do-not-send="true"
            href="https://www.w3.org/Voice/2013/scxml-irp/354/test354.txml"
style="color:rgb(85,34,153);font-family:sans-serif;font-size:medium;background:transparent">test354.txml</a> in
          the scxml irp. For xpath it makes use of a template
          implemented like this:</div>
        <div><br>
        </div>
        <div>
          <div class=""
            style="color:rgb(0,0,0);font-family:monospace;font-size:13px"><span
              class="">&lt;xsl:template<span class=""> <span class="">match</span>="<span
                  class="">//@<a class="moz-txt-link-freetext" href="conf:eventDataNamelistValue">conf:eventDataNamelistValue</a></span>"</span>&gt;</span></div>
          <div class=""
style="margin-left:1em;color:rgb(0,0,0);font-family:monospace;font-size:13px"><span
              class=""></span>
            <div class="" id="collapsible123">
              <div class="">
                <div class=""><span class=""
style="display:inline-block;width:10px;vertical-align:bottom;height:10px;background:url(&quot;&quot;)"></span><span
                    class="">&lt;xsl:attribute<span class=""> <span
                        class="">name</span>="<span class="">expr</span>"</span>&gt;</span></div>
                <div class="" style="margin-left:1em"><span class="">$_event/data/data[@id='Var</span>
                  <div class=""><span class="">&lt;xsl:value-of<span
                        class=""> <span class="">select</span>="<span
                          class="">.</span>"</span>/&gt;</span></div>
                  <span class="">']/data/text()</span></div>
                <div class=""><span class="">&lt;/xsl:attribute&gt;</span></div>
              </div>
            </div>
            <span class=""></span></div>
          <div class=""
            style="color:rgb(0,0,0);font-family:monospace;font-size:13px"><span
              class="">&lt;/xsl:template&gt;</span></div>
        </div>
        <div class=""
          style="color:rgb(0,0,0);font-family:monospace;font-size:13px"><span
            class=""><br>
          </span></div>
        <div class=""
          style="color:rgb(0,0,0);font-family:monospace;font-size:13px"><span
            class="">It creates an expression like this:</span></div>
        <div class=""
          style="color:rgb(0,0,0);font-family:monospace;font-size:13px"><span
            class=""><br>
          </span></div>
        <div class="" style=""><span class=""><font face="monospace"
              color="#000000">expr="$_event/data/data[@id='Var1']/data/text()" </font><br>
          </span></div>
        <div class="" style=""><span class=""><font face="monospace"
              color="#000000"><br>
            </font></span></div>
        <div class="" style=""><span class=""><font face="monospace"
              color="#000000">I don't understand why there should be
              three levels of data?</font></span></div>
        <div class="" style=""><span class=""><font face="monospace"
              color="#000000"><br>
            </font></span></div>
        <div class="" style=""><span class=""><font face="monospace"
              color="#000000">The first is from event, ok.</font></span></div>
        <div class="" style=""><span class=""><font face="monospace"
              color="#000000">The second is from 2.7.1 in the xpath
              specification, ok</font></span></div>
        <div class="" style=""><span class=""><font face="monospace"
              color="#000000"><br>
            </font></span></div>
        <div class="" style=""><span class=""><font face="monospace"
              color="#000000">But why is there a third data element?</font></span></div>
        <div class="" style=""><span class=""><font face="monospace"
              color="#000000"><br>
            </font></span></div>
        <div class="" style=""><span class=""><font face="monospace"
              color="#000000">Why isn't a template below used?</font></span></div>
        <div class="" style=""><span class=""><font face="monospace"
              color="#000000"><br>
            </font></span></div>
        <div class="" style=""><span class="">
            <div class=""
              style="color:rgb(0,0,0);font-family:monospace;font-size:13px">
              <div class=""><span class="">&lt;xsl:template<span
                    class=""> <span class="">match</span>="<span
                      class="">//@<a class="moz-txt-link-freetext" href="conf:eventDataNamelistValue">conf:eventDataNamelistValue</a></span>"</span>&gt;</span></div>
              <div class="" style="margin-left:1em"><span class=""></span>
                <div class="" id="collapsible123">
                  <div class="">
                    <div class=""><span class=""
style="display:inline-block;width:10px;vertical-align:bottom;height:10px;background:url(&quot;&quot;)"></span><span
                        class="">&lt;xsl:attribute<span class=""> <span
                            class="">name</span>="<span class="">expr</span>"</span>&gt;</span></div>
                    <div class="" style="margin-left:1em"><span class="">$_event/data/data[@id='Var</span>
                      <div class=""><span class="">&lt;xsl:value-of<span
                            class=""> <span class="">select</span>="<span
                              class="">.</span>"</span>/&gt;</span></div>
                      <span class="">']/text()</span></div>
                    <div class=""><span class="">&lt;/xsl:attribute&gt;</span></div>
                  </div>
                </div>
                <span class=""></span></div>
              <div class=""><span class="">&lt;/xsl:template&gt;</span></div>
            </div>
            <div class=""
              style="color:rgb(0,0,0);font-family:monospace;font-size:13px"><span
                class=""><br>
              </span></div>
            <div class=""
              style="color:rgb(0,0,0);font-family:monospace;font-size:13px"><span
                class="">Where in the specifications does it say that
                there should be a event/data/data[@id='']/data/
                structure when using xpath?</span></div>
            <div class=""
              style="color:rgb(0,0,0);font-family:monospace;font-size:13px"><span
                class=""><br>
              </span></div>
            <div class=""
              style="color:rgb(0,0,0);font-family:monospace;font-size:13px"><span
                class="">For ecmascript the template looks like:</span></div>
            <div class=""
              style="color:rgb(0,0,0);font-family:monospace;font-size:13px"><span
                class=""><br>
              </span></div>
            <div class=""
              style="color:rgb(0,0,0);font-family:monospace;font-size:13px"><span
                class="">
                <div class=""><span class="">&lt;xsl:template<span
                      class=""> <span class="">match</span>="<span
                        class="">//@<a class="moz-txt-link-freetext" href="conf:eventDataNamelistValue">conf:eventDataNamelistValue</a></span>"</span>&gt;</span></div>
                <div class="" style="margin-left:1em"><span class=""></span>
                  <div class="" id="collapsible80">
                    <div class="">
                      <div class=""><span class=""
style="display:inline-block;width:10px;vertical-align:bottom;height:10px;background:url(&quot;&quot;)"></span><span
                          class="">&lt;xsl:attribute<span class=""> <span
                              class="">name</span>="<span class="">expr</span>"</span>&gt;</span></div>
                      <div class="" style="margin-left:1em"><span
                          class="">_event.data.Var</span>
                        <div class=""><span class="">&lt;xsl:value-of<span
                              class=""> <span class="">select</span>="<span
                                class="">.</span>"</span>/&gt;</span></div>
                      </div>
                      <div class=""><span class="">&lt;/xsl:attribute&gt;</span></div>
                    </div>
                  </div>
                  <span class=""></span></div>
                <div class=""><span class="">&lt;/xsl:template&gt;</span></div>
                <div class=""><br>
                </div>
                <div class="">I cannot understand why there is a
                  difference.</div>
              </span></div>
            <div class=""
              style="color:rgb(0,0,0);font-family:monospace;font-size:13px"><span
                class=""><br>
              </span></div>
            <div class=""
              style="color:rgb(0,0,0);font-family:monospace;font-size:13px"><span
                class="">Best regards,</span></div>
            <div class=""
              style="color:rgb(0,0,0);font-family:monospace;font-size:13px"><span
                class=""><br>
              </span></div>
            <div class=""
              style="color:rgb(0,0,0);font-family:monospace;font-size:13px"><span
                class="">Jon</span></div>
            <div class=""
              style="color:rgb(0,0,0);font-family:monospace;font-size:13px"><br>
            </div>
          </span></div>
        <div class="" style=""><span class=""><font face="monospace"
              color="#000000"><br>
            </font></span></div>
      </div>
    </blockquote>
    <br>
  </body>
</html>

--------------EAB48A61194A5DAD38DA330A--