XSLT Reports and Internet Explorer - xslt

with IE at its EOL and allowing file access from files in Chrome is not a viable option for us, what is the future of XSLT reports?
I am fairly new to this, and have just been "thrown" into finding a solution. Everything I'm finding online is years old, it's strange that no one is talking about this since "death" of IE.
our data is in XML format, using XSL templates to display formatted reports to browser via ScriptX (smsx.cab) (with page breaks, headers, etc). The user then "prints to PDF"
I am hoping to see what other organizations are doing to ensure existing XSLT reports continue to work. Converting to something else? Making them work with other, currently supported, browsers?
thank you, all and any tips, links and comments much appreciated.

You could try executing your XSLT transformations using a local script.
Take note that these solutions only support XSLT 1.0.
MSXML
successor of msxsl.exe?
PowerShell
Applying XSL to XML with PowerShell : Exception calling "Transform"
If you want to use XSLT 2.0+
You can use Saxon and call the jar file from a batch file.
https://www.saxonica.com/

Related

XSLT Regex Replace Function

We've been pulling our hair out just trying to just trying to get a basic example of the XSLT replace function to work.
I'm leaving this text in tact for context, but you may want to skip to the update
We're using Mirth to pull in HL7 messages. We're unsure whether this supports XSLT version 2, but we believe it uses SAXON - http://saxon.sourceforge.net/, which purportedly does support XSLT2 and hence the replace function.
In any case, we tried using XSLTCake to try and get even a demo replacement to work, to no avail. We've seen this either referenced as replace or fn:replace as well as a couple other suggestions using other libraries.
If XSLT2 isn't supported by Mirth, we would need a workaround for XSLT1. We found one here: XSLT string replace - but have been unable to get this to work either.
This is a tough to get down to a single question as I'm asking alot, but here goes... Can anyone provide a working example of performing a regex replacement in an XSLT? Preferably one that will run in an online parser for reference.
Here's a sample - which apparently should work.1
Update
Thanks to Michael Kay for providing code below to determine XSLT version.
<!--Transformed using 1.0 provided by Apache Software Foundation (Xalan XSLTC)-->
So It turns out we were all wrong about Mirth using SAXON and hence supporting XSLT2. I'll update with our attempt at implementing the version 1 workaround.
First find out which XSLT processor you are using. This is straightforward: insert this
<xsl:comment>Transformed using <xsl:value-of select="system-property('xsl:version')"/> provided by <xsl:value-of select="system-property('xsl:vendor')"/></xsl:comment>
into your stylesheet to output a comment in your result document.
Once you know what programming language you are using, you can start thinking about writing code.

DocBook to OOXML

Our users are asking for a simple way to convert DocBook XML to OOXML (DocBook to Word DOCX) and back. The editing in house is done in Oxygen XML Editor but sometimes they have to send files for editing to other people and Word is still the de facto standard.
I imagine this will be a major undertaking so any help is appreciated.
EDIT:
Found docbook2wordml XSL stylesheets. This could be useful.
Try Oxgarage: http://www.tei-c.org/oxgarage/ it converts between DocBook and OOXML (and other formats) via TEI.
You can use it as a web service, or you can get the XSLT 2.0 scripts here: https://github.com/TEIC/Stylesheets/
Edit: updated links!
OxGarage http://oxgarage.oucs.ox.ac.uk:8080/ege-webclient/ seems down.
Alternatively, you can get up running your own OxGarage service using the OxGarage docker image, which should be the preferable way.
Also you could try building an OxGarage docker image yourself using this oxgarage-docker GutHub repo. Once it's up running, then you can use the OxGarage web client in your browser:
http://<your host name e.g., localhost>:8080/ege-webclient

XSLT to convert an XML element containing RTF data to HTML?

OK, so here's the background:
We have a third-party piece of software that does a lot of complicated stuff to generate an XML file from a lot of tables based on a wide array of business rules. The software allows you to apply an XSL transformation by supplying an XSLT file as part of its workflow, before continuing on in the process, which is usually an upload to one or more servers, based on more business rules.
Here's the problem:
One of the elements (with more on the way) this application is processing contains RTF text, and needs to be converted into formatted HTML before being uploaded. There are no means of transforming the XML inside the application other than through an XSLT file, and once we output the file, we cannot resume the workflow. My original thought was, "Easy! someone must have written a few XSL transforms for converting RTF to formatted HTML!" Hours of searching later, I must conclude I either suck at searching or it's awfully obscure.
Disclaimers:
I know the software is pretty darned limited; I'm stuck with it.
I know there are a lot of third-party tools to do this; they are not available to me because I would need to run them externally.
I know that this is not a pretty or efficient thing to do with XSLT. Changing that is not an option for me at this point.
If I cannot find a means to do this through pure XSL transforms, I will need to output the files locally, run the extra process, and take the destination routing on through a custom process. I really don't want to do that.
Does anyone have access to an XSL transformation function/ scheme that will allow me to do this natively in the application? Perhaps a series of regular expressions I could use or something?
So it turns out that external scripts can be invoked from the XSLT. It seems I will be using another scripting language to get this to work. I'm a little bummed there was no other answer available.

JUnit Report single page XSLT for email

I have a Junit process that runs a bunch of data integrity tests every night, and I would like to have it email the results in a nicely formatted HTML email. The issue is the HTML formatter built into JUnit uses frames and an external stylesheet so it is not appropriate for email. The plain formatter has the results buried in the midst of a bunch of otherwise worthless data.
I thought it would be simple to find a XSLT stylesheet that formatted the XML output into an email-friendly format, but after a couple hours of googling, I have not been able to find one. If any of you have a email-friendly Junit formatter, I'd be eternally grateful.
From http://ant.apache.org/manual/Tasks/junitreport.html
Ant assumes the following concerning
the frames and noframes formats :
The frames format uses a stylesheet
which is generating output only by
redirecting.
The noframes format does not use
redirecting and generates one file
called junit-noframes.html.
Custom versions of junit-frames.xsl or
junit-noframes.xsl must adhere to the
above conventions.
Edit: The only web aviable source in here
Use the one that Ant's <junitreport> to create the HTML report and email that.

create droplet app. to transform xml with xslt

I want to create a application, where you drop a xml doc on it, and an xslt transformation occurs using saxon as the transform engine. The result is a text file.
I am doing this on a mac. Does anyone know where I could find a beginner tutorail to approach this??
Thanks,
Ian
At sourceforge, take a look at the saxon resource zip file, it contains example applications for saxon.