Pass document as parameter to XSL Translation in Java

后端 未结 4 1662
无人及你
无人及你 2021-01-12 11:01

I\'m working on addition internationalization to my XSL. I\'ve seen plenty of examples of creating a dictionary.xml file and loading it into my XSL via document(\'dictionar

4条回答
  •  猫巷女王i
    2021-01-12 11:37

    Ok, I made a skeleton copy of your code. This is going to sound bizarre, but after you create your dictionary document in the java code, and before you set it as a parameter for the transformer, just invoke the method:

    dictionary.getDocumentElement();
    

    then it works! Looks like a bug in the way saxon is handling a parameter thats a document, where it requires some kind of initialisation which hasnt been done ? I'm not digging into the debugger.

提交回复
热议问题