XSLT - remove whitespace from template

前端 未结 8 1853
北恋
北恋 2020-12-02 13:23

I am using XML to store a small contact list and trying to write a XSL template that will transform it into a CSV file. The problem I am having is with whitespace in the out

8条回答
  •  醉梦人生
    2020-12-02 13:33

    By default, XSLT templates have set, which will keep whitespace in your output. You can add to tell it to where to delete whitespace.

    You may also need to include a normalize-space directive, like so:

     
    

    Here is an example for preserve/strip space from W3 Schools.

提交回复
热议问题