Skip to content
Advertisement

Tag: xslt

XSLT filitering for both begin with and followed by characters

I am working in project where I am given a list of allowed characters, and required to remove the unwanted characters. I have the following done, but I felt it is cumbersome and than it should be Testing the start condition I have added three checks. The contains check returns true for empty string case, and thus I have added

XSLT – masking data – Conditional on other tags

I am trying to mask an xml document where some specific tags are present. I have created a java app which contains saxon9he as dependency. I have multiple use case, some are straight forward but some are conditional. Assuming the below given <Prsn> tag is present at multiple different locations: Input xml snippet Transformation that is needed In this above

How to set Saxon as the Xslt processor in Java?

This is a simple question, but one I cannot find the answer to. I have an XSLT 2.0 stylesheet that I’m trying to process in Java. It relies on XSL elements from Saxon. My current class works fine with simple XSLT 1.0, but I’m getting errors about unrecognized elements with my 2.0 XSLT built with Saxon. I cannot figure out

How to make javax Transformer output HTML (no self-closing tags)?

I’m using a javax.xml.transform.Transformer to convert an XML file into an HTML file. It can happen that a div will have no content, which causes the Transformer to output <div/>, which breaks rendering. I’ve searched and found that “You can change the xslt output to html instead of xml to avoid the problem with self closing tags”, but that was

Advertisement