- From: Jon Kerny <jon.kerny@gmail.com>
- Date: Sun, 1 May 2016 23:02:14 +0200
- To: www-voice@w3.org
- Message-ID: <CAC5YMgHJ_N1gjMk8_nVrQ0gtwUOUsM+5zhBir2P12BffusKj5A@mail.gmail.com>
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
Received on Sunday, 1 May 2016 21:02:43 UTC