Need to assign attribute value in single quote xslt

前端 未结 1 360
忘了有多久
忘了有多久 2021-01-19 03:43

we need to create a html from xml using xslt transformation. We require the resulting html anchor tag as





        
1条回答
  •  无人及你
    2021-01-19 04:16

    Unless the vendor of your XSLT processor gives you an extension to request this, it is out of your hands. Such serialization choices are made by the processor and cannot be specified in an XSLT stylesheet using standardized mechanisms. A processor may offer this, but I haven't seen it (not that I've gone looking ... from an XML perspective, the resulting information set is unchanged regardless of the attribute delimiter chosen).

    Why is the choice of attribute delimiter important to the processing of your information? You must be using a non-XML step in your data flow for this to be of concern.

    Ref: http://www.w3.org/TR/xslt-xquery-serialization/#serparam where your use case happens to be the example cited:

    In those cases where they have no important effect on the content of the serialized result, details of the output methods defined by this specification are left unspecified and are regarded as implementation-dependent. Whether a serializer uses apostrophes or quotation marks to delimit attribute values in the XML output method is an example of such a detail.

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