skip to Main Content

We are planning to use Saxonica EE (yet to buy) in Spring Boot microservice on Cloud Foundry and we want to store the XSLT compiled version in XML in Redis cache so that when do transformation it would be less time consuming, I have below questions, can you please guide me in right direction.

  1. how can we deploy Saxon EE libs with licence to the cloud, any standard practice need to be followed.

  2. is it possible to get the XSLT compiled code in XML format so that I can store in Redis cache, is this approach make sense (if there is any change in XSLT I will re-compile every time)

  3. Any java programming samples, we use xsl:include heavily in all xsls , if there is any example for the same use-case would be great.

2

Answers


  1. I recommend you to start by getting the basic foundation of clarity in place as described below:

    About choosing Redis for storage :

    If your going for Redis as storage you normally would have to serialize your (XSLT processed) output into XML or JSON prior to storing it into Redis. This means also that any time you want to access the data in a more human-friendly readable way, you would have to deserialize the Redis string.

    Answers on your bulleted questions (in relation to XSLT) :

    [1] Cloud deployment: Even if you would like to use cloud solutions you would still need to define on which server you would like to install Java/SDK and Saxon libraries (jar). In terms of details around license for cloud solution, I would refer to the company Saxonica.

    [2] Need of compiling: Saxon XSLT is not normally being compiled by user (unless there is a reason for it). I suspect when you say "compiled" in this bullet that you mean the transformation process, using a source XML, XSLT for processing and getting an output XML. – If so, you can set which output format you want (XML/HTML/XHTML). Every time you change something in your source- or XSL file, you would need to run XSLT to see the change in the XML output file.

    [3] Need of Java samples: You do not need Java knowledge to build XSL stylesheet files. The Java comes into the picture if you choose to run on Java you would need to setup Java/SDK on the machine that would run Saxon XSLT. After the setup (Java/SDK and XSLT) you can choose between calling XSLT from a terminal or create scripts that would call XSLT (I use bash scripts in Linux).

    I recommend that you start using an online XSLT tool meanwhile you solve your Java environment and Saxon XSLT. This way you can build up your XSL files or test any of your existing XSL files in order to adjust them to your needs.

    Login or Signup to reply.
  2. For the commercial questions regarding licensing for cloud deployment, that’s out of scope for StackOverflow – please contact Saxonica directly to discuss this.

    Saxon-EE can compile a stylesheet to a SEF file which is indeed an XML format, but I’ve no idea whether storing the compiled stylesheets in Redis makes any sense.

    If you have a problem using xsl:include, I suggest you raise it as a separate question. A general request for advice on using a particular feature isn’t likely to elicit helpful responses – StackOverflow works best if you have a specific technical question, or a specific technical problem. (If you want general advice, my XSLT reference book has about 4 pages on xsl:include, with examples).

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search