Is there a way to use XSLT 1.0 processing in Mule 3.4.0 standalone? I did some googling. But did not find any answers.
If by processing you mean "transformation", the answer is a resounding yes: http://www.mulesoft.org/documentation/display/current/XSLT+Transformer
In case you dont want to use XSLT transfromer, you can also have a custom Java component or transformer in your mule flow and write java transformation logic using TransformerFactory.
Thanks KJ
Mule has an XSLT transformer out of the box that you can use in your flows, and yes it supports XSLT 1.0. Check out this tutorial: http://marcotello.com/mule-esb/using-the-xslt-transformer-in-mule-esb/
Related
This annotation is documented here but not marked deprecated, however in the migration guide there's no mention of why it was removed, and what should be used instead.
I am totally new to Ktor, and I am supposed to port a 1.6 project to 2 while learning Ktor from scratch. Some leads in this direction will be much appreciated. Thanks
Multiple DSL markers were unified so you can use the KtorDsl annotation instead.
I know Datamapper can easily convert an XML structure to a map easily. But what is the best way to do this in Community edition? Note I want Maps rather than a concrete class sung Jaxb.
The json-to-object-transformer allows you to easily convert to a map but is there anything similar for XML?
As of now Mule Community Edition doesn't provide any out of the box solution for this.
You can always crate a Custom transformer and use some API like XStream to convert the XML to map.
Following Stackoverflow post give you a sample of how to use XStream API.
How to convert XML to java.util.Map and vice versa
Hope this helps.
I had this question in mind for long time and am jotting it down now.
Which will be a best practice or has an edge over others while transforming or processing data in Mule ESB. I am curious to differentiate between the following components.
Java Script
Groovy Script
Other allowed scripts
VS
Java Component or Java Transformer
Usually any ESB should provide various options for the transformations and Mule also provides a lot of ways and methodologies for transformation.
I am curios to know which is better for some of the common situations.
For example check the scenarios for below.
Calling a java component to chunk out a list from an object and make that list as the payload VS using OGNL in set payload component.
OGNL is being deprecated in Mule.
Regarding Javascript vs Groovy vs MEL (MVEL) I would say it depends.
MEL scripts are the faster to start (find here some performance benchmarks), followed by Javascript (Mule still does not use Java 8's Nashorn) and followed by Groovy.
However, for very big tasks where initialization doens't matter that much groovy might still perform faster.
Anyhow, for almost the 100% of the cases, Java components, on equivalent tasks will perform faster than any other binding. This is due that Mule is written in Java and is doing straight API calls without using bindings or adaptations.
here's an idea i have been playing with for a while.
is it possible to mix CDI and Struts 1.3 ?
E.g. via a CDI Portable Extension..?
As for 'why', there are still a few projects 'out there' which are stuck on an old stack and don't have the option to switch to struts 2..
Just throwing it out there, i'm interested in your ideas =)
greetings from germany
I just committed my library to github, called struts-cdi. You should check it out.
https://github.com/reegnz/struts-cdi
It only works with Struts Actions for now, and not with ActionForms. If the need arises, I will also try to do container managed ActionForms. :^)
Stripes Injection Enricher satisfies injection points specified declaratively using standard Java EE annotations (#EJB, #Inject and #Resource).
I've tried to use the XPath 2.0 exp //span/string(.) in libxml2, but it doesn't work.
So, my question is: does libxml2 support XPath 2.0 or not?
According to this 2007 email from the maintainer of libxml2, libxml2 does not, and will not, support XPath 2.0.
As far as I know -- not. The prevailing majority of XPath 2.0 implementations are part of XSLT 2.0 processors or XQuery processors.
you might be interested in an XPath 2.0 extension to libxml2 - however, 2 caveats apply: it's work in progress and it's free for non-commercial use only.
hope this helps,
best regards, carsten
ps:
i am neither affiliated with the guys working on libx nor have i any personal experience on using it or knowledge beyond the info from their website.
Libxml2 implements a number of existing standards related to markup languages:
the XML standard: http://www.w3.org/TR/REC-xml
Namespaces in XML: http://www.w3.org/TR/REC-xml-names/
XML Base: http://www.w3.org/TR/xmlbase/
RFC 2396 : Uniform Resource Identifiers http://www.ietf.org/rfc/rfc2396.txt
XML Path Language (XPath) 1.0: http://www.w3.org/TR/xpath
HTML4 parser: http://www.w3.org/TR/html401/
XML Pointer Language (XPointer) Version 1.0: http://www.w3.org/TR/xptr
XML Inclusions (XInclude) Version 1.0: http://www.w3.org/TR/xinclude/
ISO-8859-x encodings, as well as rfc2044 [UTF-8] and rfc2781 [UTF-16] Unicode encodings, and more if using iconv support
part of SGML Open Technical Resolution TR9401:1997
XML Catalogs Working Draft 06 August 2001: http://www.oasis-open.org/committees/entity/spec-2001-08-06.html
Canonical XML Version 1.0: http://www.w3.org/TR/xml-c14n and the Exclusive XML Canonicalization CR draft http://www.w3.org/TR/xml-exc-c14n
Relax NG, ISO/IEC 19757-2:2003, http://www.oasis-open.org/committees/relax-ng/spec-20011203.html
W3C XML Schemas Part 2: Datatypes REC 02 May 2001
W3C xml:id Working Draft 7 April 2004
Since libxml2 supports XPath 1.0, the syntax is incorrect:
//span/string(.)
Should be:
string(//span/.)
For clarification, the string method is part of XPath 1.0 as well. For future reference:
libxml2 supports XPath 1.0
Objective-C supports XPath 2.0 via the nodesForXPath method of NSXMLNode in GNUStep/NextStep
The Cocoa implementation uses XPath 2.0, which is a World Wide Web Consortium recommendation.
References
NSXML Concepts: XML Glossary
NSXML Concepts: Querying an XML Document
NSXMLNode: nodesForXPath
GNUStep: NSXMLNode Class Documentation
GalaXquery
PsychoPathXPathProcessor
CoreServicesLayer
libxml, a.k.a. gnome-xml