Hi, Ferrel! First of all, I have to say that the LibXSLT (LibXML XSLT engine) author is Daniel Veillard (http://xmlsoft.org/XSLT). I will forward your LibXSLT questions to the LibXSLT related mailing list ([EMAIL PROTECTED]) since I am not familiar enough with LibXSLT internals. You also can chech LibXSLT mailing list arcive: http://mail.gnome.org/archives/xslt/2002-July/thread.html (I've seen some LibXSLT vs MSXML questions recently).
Regarding your first XPath question I would like to check it myself. If you don't mind, will you send me the "file.xml", please? Thanks, Aleksey Ferrell Moultrie (ISSAtlanta) wrote: >Aleksey: > Thank you for your answers on LibXML2 and XMLSec versus Xerces. I've >downloaded and built the libxml2 and xslt projects and have been running >bits of our code through them. I've got three questions about differences >between your xslt and the Xalan and/or MS xslt: > >1) your xpath expressions appear to require the apostrophe rather than the >double-quote for delimiting data values, at least one the testXPath utility. >I.e., > testXPath -i file.xml /root//EndUser[Country=\'US\'] works, but, > testXPath -i file.xml /root//EndUser[Country=\"US\"] doesn't. >In the first case, the XPath parse tree shows: > EQUAL = > COLLECT 'attributes' 'name' 'node' Country > NODE > ELEM Object is a string : US > COLLECT 'attributes' 'name' 'node' Country > NODE >In the second case, it shows: > EQUAL = > COLLECT 'attributes' 'name' 'node' Country > NODE > COLLECT 'child' 'name' 'node' US > NODE >I believe the backslash-quoting of the apostrophe or double-quote should >pass through the ksh variant I'm running. > >2) My XSLT templates have explicit support for copying XML comments through >to the output. This works with MSXML and Xalan but comments get dropped with >you XSLT. Is this a configuration or other option or does your DOM just >ignore comments (as it's allowed to do, but not required to do, by the spec >-- but which is inconvenient from my perspective). > >3) Your XSLT appears to want an explicit root match as the first template. >I.e., > ><xsl:template match='/'> > <xsl:apply-templates select="@* | node()"/> ></xsl:template> > ><xsl:template match='/Keys'> > <xsl:copy> > <xsl:apply-templates select="@* | node()"/> > </xsl:copy> ></xsl:template> > >... other templates ... > ><xsl:template match="@* | node()" priority="-10"> > <xsl:copy-of select="."/> ></xsl:template> > >And with input XML whose root begins: ><Keys> > ... other XML > >Your XSLT, MSXSL, and Xalan XSLT all process the above script and generate >essentially the same output. If I delete the first three lines however (the >match='/'), then MSXSL and Xalan are both still happy but your XSLT matches >"/" against the final template, i.e., the verbose output shows: >... >Registering global variables from transform2.xsl >xsltProcessOneNode: applying template '@* | node()' for / >xsltCopyOf: select . >xsltCopyOf: result is a node set > >What is the reasoning behind this behavioral difference? The MSXSL/Xalan >behavior appears to be correct as I read the books and samples I have but >I'm far from an expert in XSLT so what's the cause of the incompatibility >here? > >Sorry for so many questions but I'm trying to figure out how much work it >would be to port a portion of our apps to using libxml2 and these are the >issues that popped out with some initial compatibility testing. > >Thanks!!! > Ferrell >---------------------------------------------------------------- >Ferrell Moultrie > Home- (770)552-0486 Fax- (770)552-0489 [EMAIL PROTECTED] > Work[ISS]- (404)236-2849 Fax- (404)236-2609 [EMAIL PROTECTED] > > _______________________________________________ xmlsec mailing list [EMAIL PROTECTED] http://www.aleksey.com/mailman/listinfo/xmlsec
