Again quite spontaneous action had the Save the hard times. This time they should clock up 22 on the hill of the Günther-Klotz-Anlage arrive and set with lighter, mobile phone or even sparklers a character in the form of a light for the festival. This call came , according to details of Ka-News about 4500 people to. Given the frigid temperatures on the hill I think that's very impressive. Since we were there, I've also made some pictures
As usual But there are also the gallery for a light for the festival . Unfortunately, many images are also blurred. Quite a challenge to photograph in the conditions. Hope you like anyway 
Tags: action , images , the set , photos , light , rescue Posted in General , Photos | No Comments »
XSL with Saxon and the Java call with XML as a parameter
Inserting an XSL transformation in Java, the used processors usually offer a Java exit, to which is the possibility to call out from the transformation of a Java function. So also the Saxon .
In the implementation I came across stumbling blocks. The most important: the Saxon Home Edition (HE) supports Java and you get the call did not execute the transformation, the helpful error message "Can not find a matching 1-argument function named {java: org.package.foo.Klasse} function ()" . So there is no indication that it even fails to Saxon. So before anything in the transformation or the Java implementation changes, first to see if instead of saxon9he.jar from the Home Edition, which saxon9.jar the saxon9 dom.jar as external jar in the build path and are deposited.
Another possibility that is not the call works may be the fact that the function to be called as in any case
must be defined. Last but not least the integration of the function must be correct. Once a <xsl:stylesheet> with
<Xsl: stylesheet
xmlns: abbreviation = "java: org.package.foo.Klasse"
xmlns: xsl = "http://www.w3.org/1999/XSL/Transform>
and besides the desired destination node then
/> </Zielknoten > <Zielknoten <xsl:value-of Select = "Abkuerzung:function()" /> </ target node>
Java Does the transformation and the call of the function yields the desired result one can rise to the question of how the XML to Java pass can cut one. While this with XSL 2.0 should not be a problem, it looks at different XSL 1.0. In this there is no support for temporary trees, so that when the attempted surrender of the tree only its contents taken. One solution is to use <[CDATA [dar.
A
/> </xsl:value > <ziel> select = <xsl:value-of "/pfad/quelle" /> </ xsl: value>
would therefore only copy any existing content in the nodes. If you pack the item to copy a CDATA node, it can complete on delivery and particularly also returned.
Source:
1
2
3
4
5
|
<source>
<knoten>
</kind > <kind> <! [CDATA [test content and node <moep> </ moep> test]]> </ child>
</ Node>
</ Source> |
If the packing is the source node must also make itself and the contents of the node is copied from somewhere as well, another procedure is necessary:
1
2
3
4
5
6
7
8
9
10
11
|
<source>
<knoten>
<kind>
> < ![CDATA[ </xsl:variable > <xsl:variable "cdstart" name => <! [CDATA [</ xsl variable>
> ]] > </xsl:variable > <xsl:variable "cdend" name =>]]> </ xsl: variable>
select = "$cdstart" /> <xsl:value-of disable-output-escaping "yes" = select = "$cdstart" />
/> <xsl:copy-of select = "/anderer/quell/knoten" />
select = "$cdend" /> <xsl:value-of disable-output-escaping "yes" = select = "$cdend" />
</ Child>
</ Node>
</ Source> |
This XSL you can then copy the contents and receives the desired location at the XML tree rather than with <and> or Content provided only version.
1
2
3
|
<ziel>
/> <xsl:value-of select = "/quelle/knoten/kind" />
</ Target> |
To explain: the detour of the CDATA go to put in variables you have to, because the <and> to the HTML entities otherwise.
Tags: cdata , coding , escaping , java , saxon , xml , xsl , xslt Posted in Other | 1 Comment »