[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Daisy chaining XSLT and also how can I check wheth
I just tried (this was before your response below came in: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" B B B B B xmlns:exslt="http://exslt.org/common" B B B B B xmlns:msxsl="urn:schemas-microsoft-com:xslt" B B B B B version="1.0">. . B B B <xsl:message>Test for exl:node-set() function</xsl:message> B B B <xsl:choose> B B B B B B B <xsl:when test="function-available('exslt:node-set') = ''"> B B B B B B B B B B B <xsl:message>+++++++++ exslt:node-set NOT available ;)</xsl:message> B B B B B B B </xsl:when> B B B B B B B <xsl:otherwise> B B B B B B B B B B B <xsl:message>+++++++++ exslt:node-set IS available</xsl:message> B B B B B B B </xsl:otherwise> B B B </xsl:choose> And when I test under xsltproc on centos, I get: Test for exl:node-set() function +++++++++ exslt:node-set IS available a) Shouldn't my test (vs. your suggested code) be sufficient?B b) Also, per above I ran that on xsltproc on centos... If the above is good, then I need to try to run the same test on the product, but, sorry, I forgot to mention that the product is running on Windows, so should I change the namespace prefix in the code to "msxsl:" instead of "exslt"? c) Sorry to you all about the XSLT 1.0... but I really don't have a choice since both xsltproc and the product are using 1.0 :( !! Jim On Wednesday, August 7, 2024 at 01:59:35 PM EDT, David Carlisle d.p.carlisle@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: On Wed, 7 Aug 2024 at 18:18, ohaya ohaya@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: David, The way the product works, is there is a config parameter that point to the XLST file to be used and then the output from the XSLT gets sent to the actual target syslogd (over network), so no browser is involved.... I read through your page and it mentions: function-available('exslt:node-set') Can you suggest maybe a small XSLT that uses "function-available('exslt:node-set')" that I could use to check if whatever is doing the processing supports the node-set function? you would use <xsl:choose><xsl:when test="function-available('exslt:node-set')">B <xsl:apply-templatesB select="exslt:node-set($nodevar)"/></xsl:when><xsl:otherwise>B .. whatever you want to do if it isn't available</xsl:otherwise></xsl:choose> The ancient trick I linked to allows you to avoid having this checkB everywhere you need the function as long as the system has some way of defining a function. But I haven't used xslt1 for decades. David Can you suggest maybe a small XSLT that uses "function-available('exslt:node-set')" that I could use to check if whatever is doing the processing supports the node-set function? Then, I could try running that test XSLT under xsltproc on linux to test the test and then after that also try to run the test on the product, to determine whether or not the node-set function is available? Per the links I included in my original post, I think I need to confirm that node-set function is available to be able to try to use the code that was suggested in the stack overflow threads... Jim On Wednesday, August 7, 2024 at 12:13:52 PM EDT, David Carlisle d.p.carlisle@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: seems like only yesterday on this list I advertised http://dpcarlisle.blogspot.com/2007/05/exslt-node-set-function.html to make exslt:node-set work seamlessly on systems that supported it and systems that had a similar function in a different namespace David (a greyer version) On Wed, 7 Aug 2024 at 16:48, Martin Honnen martin.honnen@xxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: On 07/08/2024 17:36, ohaya ohaya@xxxxxxxxx wrote: From those threads above, it sounds like what I thinking of doing is POSSIBLE, but one of the requirements is the availability of an extension: ext:node-set So I wanted to find out: a) How can I check that the XSLT processor supports that extension?B Is there like a small XSLT that I can test that would tell me whether or not the XSLT processor that is running the XSLT supports that ext:node-set extension?B B Use https://www.w3.org/TR/xslt-10/#function-function-available to check from within XSLT if a certain function is available. Most XSLT 1.0 processors support exsl:node-set in the namespace http://exslt.org/common, with the exception of older Microsoft products like MSXML or XslTransform which instead support a node-set extension function in a Microsoft namespace. Not sure about Xalan, I think the Java product has support for a Xalan specific namespace as well as the EXSLT namespace. XSL-List info and archiveEasyUnsubscribe(by email) XSL-List info and archiveEasyUnsubscribe(by email) XSL-List info and archiveEasyUnsubscribe(by email) XSL-List info and archiveEasyUnsubscribe(by email)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|