[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XPath equivalence question

Subject: Re: XPath equivalence question
From: Hermann Stamm-Wilbrandt <STAMMW@xxxxxxxxxx>
Date: Fri, 2 Dec 2011 12:41:32 +0100
Re:  XPath equivalence question
Just a test since attachments are not possible on this list.

Graydon.zip.html:
<a href="data:application/zip;base64,
UEsDBBQAAAAIAFZYgT9aG2iMmQAAANMAAAAOABwAR3JheWRvbi4xdC54c2xVVAkAA8RQ107dUNdO
dXgLAAEE9AEAAAT1AQAATY/BCsIwEETv
+Yqwd7MWTy1NQc/e9OC11NUISROSrWn/3hQVvc7MezDt
nGyTeLGUDBHLJ8X08KOGSm1BSDk7O6amjDQY5tAg5pxV3ikf71jVdY2X0xHPsR/TzUcHoitQu0r9
xGFi6YiNv2ooIsBOfFsmF2zPJF3Pg9GAe8QDrPBnMPiwbPxNJrI0sAa10qXDf7r43sHvQSdeUEsD
BBQAAAAIAN1UgT
+8Nv6PmAAAANMAAAANABwAR3JheWRvbi4xLnhzbFVUCQADMUvXTjlL1051eAsA
AQT0AQAABPUBAABNjzEPgjAQRvf+iuZ2OYkThJLI7KaDK8HDmrS0aQ8L/94SNbre
+95LrlmiqSOv
hqImYvmkEB9uUlAWexBSLtZMsc4jBZrZ14gppSIdChfuWFZVhdfzCS+hn
+LoggXRZqnZom5mP7O0
xNrdFOQQYCu+lMl60zNJ2/OgFSBs4gcOzq87N8pIhgbO8IjYbXbm+G/n3vvw
+6AVL1BLAwQUAAAA
CABgWIE/dbD9a5wAAADTAAAADgAcAEdyYXlkb24uMnQueHNsVVQJAAPTUNdO4VDXTnV4CwABBPQB
AAAE9QEAAE2PwQrCMBBE7/2KsHezFk8tpqBnb3oQxEOpWyMkTUi2pv17U1T0OjPvwWynaOrIs6Go
iVg8KcSHGxSUcg2FEJM1Q6zzSIFm9jViSkmmjXThjmVVVXg
+HvAU2iH2LlgomgxtF6kb2Y8sLLF2
NwVZBNgU35bJetMyCd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</a>


Mit besten Gruessen / Best wishes,

Hermann Stamm-Wilbrandt
Level 3 support for XML Compiler team, Fixpack team lead
WebSphere DataPower SOA Appliances
https://www.ibm.com/developerworks/mydeveloperworks/blogs/HermannSW/
----------------------------------------------------------------------
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschaeftsfuehrung: Dirk Wittkopp
Sitz der Gesellschaft: Boeblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294


                                                                                                                                        
  From:       Hermann Stamm-Wilbrandt/Germany/IBM@IBMDE                                                                                 
                                                                                                                                        
  To:         xsl-list@xxxxxxxxxxxxxxxxxxxxxx,                                                                                          
                                                                                                                                        
  Date:       12/01/2011 11:49 AM                                                                                                       
                                                                                                                                        
  Subject:    Re:  XPath equivalence question                                                                                      
                                                                                                                                        





> You changed the posted example to be an xpath rather than an xslt
> pattern. The two expressions are clearly not equivalent as Xpath, but
> they are as patterns. The question was about the pattern form (despite
> the subject line:-)

Thanks for clarifying, find the corrected stylesheets below.


I cannot answer Graydon's original question for saxon or xsltproc.

But I just generated visual output of DataPower XSLT processor stylesheet
compilation. Both stylesheets get compiled differently (zoom intended):
http://stamm-wilbrandt.de/en/xsl-list/Graydon.12t.xsl.gif

Stylesheet profiling did not show any difference for the two templates,
both accounted for 160ms in processing 25000 requests each on DataPower
box.


$ xsltproc Graydon.1t.xsl Graydon.xml
<?xml version="1.0"?>
<B/>
$
$ xsltproc Graydon.2t.xsl Graydon.xml
<?xml version="1.0"?>
<B/>
$
$ cat Graydon.xml
<A><a><b><c><B/></c></b></a></A>
$
$ cat Graydon.1t.xsl
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
  <xsl:output method="xml"/>

  <xsl:template match="/A//B">
    <xsl:copy-of select="."/>
  </xsl:template>

</xsl:stylesheet>
$
$ cat Graydon.2t.xsl
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
  <xsl:output method="xml"/>

  <xsl:template match="B[/A]">
    <xsl:copy-of select="."/>
  </xsl:template>

</xsl:stylesheet>
$


Mit besten Gruessen / Best wishes,

Hermann Stamm-Wilbrandt
Level 3 support for XML Compiler team, Fixpack team lead
WebSphere DataPower SOA Appliances
https://www.ibm.com/developerworks/mydeveloperworks/blogs/HermannSW/
----------------------------------------------------------------------
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschaeftsfuehrung: Dirk Wittkopp
Sitz der Gesellschaft: Boeblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294



  From:       David Carlisle <davidc@xxxxxxxxx>


  To:         xsl-list@xxxxxxxxxxxxxxxxxxxxxx,


  Cc:         Hermann Stamm-Wilbrandt/Germany/IBM@IBMDE


  Date:       12/01/2011 10:51 AM


  Subject:    Re:  XPath equivalence question







On 01/12/2011 09:43, Hermann Stamm-Wilbrandt wrote:
> Have you tried out what you propose as equivalent below?
>
> No XSLT processor is doing what you say, xsltproc, saxon, DataPower, ...
>

You changed the posted example to be an xpath rather than an xslt
pattern. The two expressions are clearly not equivalent as Xpath, but
they are as patterns. The question was about the pattern form (despite
the subject line:-)

David



--
google plus: https:/profiles.google.com/d.p.carlisle

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs.
________________________________________________________________________

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.