Add a namespace to elements

前端 未结 3 670
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-11 02:56

I have an XML document with un-namespaced elements, and I want to use XSLT to add namespaces to them. Most elements will be in namespace A; a few will be in namespace B. How

3条回答
  •  一向
    一向 (楼主)
    2020-12-11 03:03

    Here's what I have so far:

    
        
            
        
    
    
    
        
          
        
    
    

    This almost works; the problem is that it's not copying attributes. From what I've read thusfar, xsl:element doesn't have a way to copy all of the attributes from the element as-is (use-attribute-sets doesn't appear to cut it).

提交回复
热议问题