How can you deal with embedded XML tags in XSLT?

前端 未结 4 826
鱼传尺愫
鱼传尺愫 2020-12-31 09:25

I am using XSLT to convert XML to HTML. I am having trouble figuring out how to deal with embedded XML nodes for formatting. For example, let\'s say I have the XML element:<

4条回答
  •  青春惊慌失措
    2020-12-31 09:44

    Two things to note.

    First. Make sure tags are screened in CDATA

    
    
    
        Star Wars saga]]>
    
    

    Second. Disable output escaping:

    
    
    
    
      
        
          
            

    EDIT: managed it with the editor, now the code is shown as it should

    EDIT2: included changes in your code

    EDIT3: To whom it may concern, the very domain of the problem in question is about structuring movies information, and not html data. HTML is there for markup purposes only, imagine having, say, html title tag inside favoriteMovie, whereas the same named tag title could be a valid tag in the movies database. These title's CLEARLY have to be interpreted differently. This justifies using CDATA and then disabling output when processing.

提交回复
热议问题