如何在PHP中设置LibXslt以使用单引号呈现某些属性
这将持续一段时间 问题:用单引号如何在PHP中设置LibXslt以使用单引号呈现某些属性,php,xslt,libxslt,Php,Xslt,Libxslt,这将持续一段时间 问题:用单引号“而不是双引号”环绕属性值 用例:将JSON存储在属性中,作为插件等的设置传递。例如: <div id="plugin-instance" data-plugin-options='{"opt1":"foo", "opt2": "baz\'s bar"}'/> 不,这在libxslt中是不可能的。但是libxslt将始终输出双引号作为“内部属性: <div data-plugin-options="{"opt1&quo
“
而不是双引号”
环绕属性值
用例:将JSON存储在属性中,作为插件等的设置传递。例如:
<div id="plugin-instance" data-plugin-options='{"opt1":"foo", "opt2": "baz\'s bar"}'/>
不,这在libxslt中是不可能的。但是libxslt将始终输出双引号作为“
内部属性:
<div data-plugin-options="{"opt1":"foo", "opt2": "baz\'s bar"}"></div>