saxon | Orbeon Forms 's version of Saxon
kandi X-RAY | saxon Summary
kandi X-RAY | saxon Summary
Orbeon Forms's version of Saxon
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Perform the transformation .
- Parse the options .
- Looks ahead .
- Parse a constructor expression
- Sets a configuration property .
- Convert a string to a DateTime value .
- Parse the kind test
- Convert a where clause to a predicate .
- Convert the given value to a DotNet value .
- Set a serialization property .
saxon Key Features
saxon Examples and Code Snippets
Community Discussions
Trending Discussions on saxon
QUESTION
I am generating HTML from XML sources using XSLT. The HTML shows a lot of whitespace that was not in the original XML files. Normally this is not a problem as the browser will ignore the extra whitespace characters. But I am developing an application that relies on correct positioning of the text cursor inside the HTML page. The added whitespaces do mess up the offsets, making it impossible to reliably position the cursor inside an element.
My question: how can I get my XSLT to not introduce any additional whitespaces in text nodes? I am using but that does not keep the processor from introducing lots of whitespace. It looks like some pretty-printing processing is applied to the HTML and I have no idea where this comes from. I am currently using Saxon PE 9.9.1.7
[Edit]
I created a simple example that shows the same strange behaviour. First the XML:
...ANSWER
Answered 2022-Mar-22 at 11:20The default for output method="html"
is indent="yes"
, I think, so you could certainly explicitly set indent="no"
on your xsl:output
declaration.
Additionally, as you say you use Saxon PE 9.9, you have access to XSLT 3 features like suppress-indentation="p"
and/or Saxon PE/EE specific settings to use a very high setting for the normal line length, check the documentation for e.g. saxon:line-length
or similar.
QUESTION
When i change the xsl:include
to xsl:import
it somehow works and doesnt return an empty file. I am using the Xslt30Processor
class and function Xslt30Processor::TransformFiletoFile()
, even The transform.c
doesnt work. When my xslt has a "xsl:result-document"
statement it also doesnt work.
I even tried using a previous version of Saxon/C (The 1.2.0 series) , and even that didnt work. Is there any option where it enables the use of xsl:include
or something.
This works for Java and .NET but not for the C API. I don't get any errors or exceptions when using JNI. Please help.
Here a small example which demostrates the problem:
source.xml
:
ANSWER
Answered 2022-Mar-06 at 09:39I think I have found one reason why the stylesheet fails on compilation, it seems a build/configuration problem with HE not finding categories.xml.
Stack trace from compilation:
QUESTION
I'm doing research to solve a transformation problem that is fundamentally based entirely in JSON, and while imperative code-based solutions are possible, there is appeal in using an established technology like XSLT and leveraging its many features rather than trying to in-house everything from scratch. I'm fairly inexperienced with XSLT but I would love for this effort to provide a reason to learn it.
I've read that JSON is included in XSLT 3.0 and XPath 3.1 specs, and that Saxon-JS supports these, and furthermore that Saxon-JS has a node.js version. This has me very interested, but I haven't found much in the way of tutorials that provide instruction about how to transform JSON into other JSON; instead the focus appears to be on transforming JSON into XML.
This question is kind of broad and so I'd be happy to know just whether this is possible, and maybe where to look to start learning, but stackoverflow likes examples. With that in mind, what would a stylesheet look like that converts the first of these JSON documents to the second?
Source:
...ANSWER
Answered 2022-Feb-15 at 10:03If you use
QUESTION
(updated question from 'static replace' to 'dynamic replace')
...ANSWER
Answered 2022-Feb-09 at 18:03I don't know what you are trying with xsl:evaluate
, consider to show your code if you mention it, but it seems fold-left
calling replace
suffices:
QUESTION
Using Apache FOP I want to place an within an
or a
of a fixed size. The Graphic should be positioned in the bottom right-hand corner of the block. I just can't figure out how to specify the position. Any ideas anyone?
Now if I only had one Image it would be no problem to figure out where to position it, but I have multiple Images of slightly different sizes & want them (after - proportional - scaling) to be justified Bottom-Right.
In my desperation I tried which according to w3c is a valid option, but Saxon threw a
net.sf.saxon.trans.XPathException
.
And now, by popular demand, some FO:
...ANSWER
Answered 2022-Jan-26 at 09:06To just align the graphic to the right, add text-align="right"
to the fo:block
.
To fit the fo:block
to the graphic, also add max-height="13mm" font-size="0"
.
QUESTION
I'm trying to transform my XML so I can easily convert it to JSON in a sap integration process. I'm getting a stylesheet compilation error and I cant figure out why. Here is my XML:
...ANSWER
Answered 2022-Jan-26 at 22:04You need to declare the schema namespace for the xs
prefix that is used for the integer type declaration:
QUESTION
I want to add an xml element to a specified location within xml document. The problem is, that element will be in a param and also location (which is xpath) is also specified in param of xslt stylesheet.
XML looks like this:
...ANSWER
Answered 2022-Jan-10 at 14:48If you are using Saxon then you could leverage the saxon:eval()
function to evaluate the XPath from the $path
parameter.
Below is an example that evaluates the XPath with the result in a variable, and uses it in a template match pattern to test whether generate-id()
of the $eval
is equal to that of the matched element. If it matches, then it will add the $add
parameter as XML using parse-xml()
, as a child of that element.
QUESTION
Recently I upgraded my server and the following XSLT with Saxonb-XSLT stopped working:
...ANSWER
Answered 2021-Dec-01 at 22:22The let
binding is part of XPath 3 I think, as that it is not supported completely in XSLT 3.0 before Saxon 9.8 HE as that is the first Saxon open-source release to support the final XSLT 3.0 with XPath 3 recommendation. You might find that using version="3.0"
and then XPath 3 expressions using let
work also in 9.7 and perhaps 9.6 but in even older releases Saxon (at least the open-source edition) is an XSLT 2.0 processor with XPath 2.0 support and doesn't support any XPath 3 expressions (like let
).
The literal error message 'let' is not supported in XPath
might suggest that that release had some support for let
in XQuery but I don't recall details and I haven't checked.
It is not clear which version of Saxon you used before your upgrade and which one after it or what kind of "update" you did.
QUESTION
My goal is to get all text, including text inside elements, between 2 processing instructions using xslt.
Input file is DITA having standard XML-based structure. There are 2 processing instructions I am searching for and
. I search for text after
and before
. There can be just text or an element that has text in it.
Input
...ANSWER
Answered 2021-Nov-24 at 08:49If the PIs are always siblings then doing
QUESTION
I'm using the SSMS tool Data Discovery and Classification.
The tool automatically search for columns name like %address%
, %name%
, %surname%
, %e-mail%
, %tax%
, %zip%
, etc...
and nicely suggests you what it might be a sensible data.
The fact is that outside from Anglo-Saxon societies the column name is not in English but it can be in French, Spanish, Italian, etc..
So I found a query that could help me out list sensible data based on my language:
...ANSWER
Answered 2021-Nov-20 at 03:55Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install saxon
You can use saxon like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the saxon component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page