Cannot get xslt to output an (&) even after escaping the character

后端 未结 13 1742
轮回少年
轮回少年 2020-12-17 10:13

I am trying to create a query string of variable assignments separated by the & symbol (ex: \"var1=x&var2=y&...\"). I plan to pass this

相关标签:
13条回答
  • 2020-12-17 10:41

    org.apache.xalan.xslt.Process, version 2.7.2 outputs to the "Here is a runnable, short and complete demo how to produce such URL" mentioned above:

    <?xml version="1.0" encoding="UTF-8"?>http://www.myUrl.com/?vA=a&amp;vX=x&amp;vY=y&amp;vZ=z11522
    

    The XML declaration is suppressed with an additional omit-xml-declaration="yes", but however with output method="text" escaping the ampersands is not justifiable.

    0 讨论(0)
提交回复
热议问题