[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
Hi, I've been reading about node-set (and also mode), and it is a bit confusing, but I think that basically, even if I/we implement the XSLT chaining, what we need to do is going to have to kind of be similar to using XProc, in the sense, that we have to implement a kind of "overlord" XSLT (call it 'overlord.xsl') that (in the following I will use the actual files names to keep things more specific/clear) does the following: - Somehow causes my "initialparsetest.xsl" to be processed, and the output from that processing is stored into a variable (call it $temp1), then- the overlord.xsl has to cause the arcsight.xslB to execute, using the contents of variable $temp1 as the input Also FYI, one thing I forgot to mention in my previous post was that the output from the arcsight.xsl is text output, rather than XML. I still don't quite understand all the ins-and-outs/details for ACTUALLY doing the above, but at high-level, does the above sound correct? Thanks,Jim On Thursday, August 8, 2024 at 08:37:09 AM EDT, ohaya <ohaya@xxxxxxxxx> wrote: Hi, I guess I will continue this topic in this same thread then..... First, as an aside, I have asked about possibly using XProc, and am awaiting response. Also, I think most of the examples of chaining that I was able to find were using at least XSLT 1.0 (yes, I know :( !!! )... So, then, here's more info about what I am going to be trying to do/chain.... To start, the two main XSLTs I want to chain are as follows. - initialparsetest.xsl:B This is my XSLT which receives the "raw" syslog XML messages, and which has code to modify one of the elements from the incoming message (the element that is modified is the <ExtraDetails>).B It also includes an identity transform for passing all the other elements through to the output XML as-is. - arcsight.xsl:B This is the out-of-box XSLT provided by the vendor to transform the "raw" syslog into a text format (among other things) that is needed to work with ArcSight. - RFC5424Changes.xsl:B This is a small XSLT that the arcsight.xsl "imports". All XSLTs are XSLT 1.0 The current flow (without the chaining) looks like: B B B B Product: outputs XML to syslog ==> initialparsetest.xsl ==> syslog server/syslogd And, the desired flow, with the XSLT chaining, would ("functionally") look like: B B B B Product: outputs XML to syslog ==> initialparsetest.xsl ==> arcsight.xsl ==> syslog server/syslogd FYI, I have snippets of the XSLTs that I can post, but was wondering what is the best approach for making those available?B I can paste them into my message itself, or maybe I can upload the XSLT file to Google Drive?B Or maybe I can attach the files (there are 3 of them)? Please let me know? Thanks,Jim On Wednesday, August 7, 2024 at 05:50:04 PM EDT, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: On Wed, 2024-08-07 at 21:09 +0000, ohaya ohaya@xxxxxxxxx wrote: Also, now that I think I/we've gotten past the existence of the node-set() function, I am going to start trying to implement/test the chaining, so I think it'd be better to start a new thread for that. The usual approach in XSLT 1 is to use modes. Make sure to keep all templates with a given mode together - e.g. in a separate file you include, if possible - and always pass the mode to apply-templates <xsl:apply-templates select="exslt:node-set($first-pass-result)" mode="fix-pyjamas" /> and, maybe in fix-pyjamas.xsl, <xsl:template mode="fix-pyjamas" match="missing-button">B <button>B B <xsl:apply-templates mode="fix-pyjamas" />B </button></xsl:template> liam -- Liam Quin,B https://www.delightfulcomputing.com/ Available for XML/Document/Information Architecture/XSLT/ XSL/XQuery/Web/Text Processing/A11Y training, work & consulting. Barefoot Web-slave, antique illustrations: B http://www.fromoldbooks.org 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
|