[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Migrating XSLT (2.0) from appliance to Java?
Hi, My apologies - I accidentally clicked "Send" before I had added my text :( !! A while ago, (in February 2023), I had a thread where you all helped me get an XSLT working. I think this was the thread in the archives: "Followup question: was Re: XSLT to populate a SAML AttributeStatement from an XML ohaya ohaya@xxxxxxxxx - 16 Feb 2023 14:51:32 -0000 " At that time, the XSLT was being used on a gateway appliance (a Broadcom API Gateway), and after getting the XSLT work, we were put on hold, but now they want to pick up where we left off, but instead of the XSLT on the API Gateway, we need to use the XSLT on a Linux machine, so I am trying to get it working with Java 1.8 now. This is the test Java app that I am trying to get working: ========================================================= // Example from http://www.java2s.com/Tutorials/Java/Java_XML/0200__Java_XSLT_Intro.htm // import javax.xml.transform.Transformer; import javax.xml.transform.TransformerFactory; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; public class Main { public static void main(String args[]) throws Exception { StreamSource source = new StreamSource(args[0]); StreamSource stylesource = new StreamSource(args[1]); TransformerFactory factory = TransformerFactory.newInstance(); Transformer transformer = factory.newTransformer(stylesource); StreamResult result = new StreamResult(System.out); transformer.transform(source, result); } } ========================================================= When I try to run the XSLT that we ended up with back in February 2023, I am getting an error: "[root@dlwoas01 jl]# java Main X.xml X.xsl ERROR: 'Could not compile stylesheet' FATAL ERROR: 'Error checking type of the expression 'funcall(tokenize, [step("self", -1), literal-expr(:)])'.' :Error checking type of the expression 'funcall(tokenize, [step("self", -1), literal-expr(:)])'. " I suspect/guess that the problem is that the Java 1.8 only supports XSLT 1.0, but I don't know if it is allowable to ask about this type of thing here in this list, so I wanted to ask that first? Thanks in advance!! Jim On Tuesday, August 22, 2023 at 08:08:19 AM EDT, ohaya <ohaya@xxxxxxxxx> wrote:
|
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
|