[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
RE: [xsl] Re: xsl-list Digest 31 Jul 2007 05:10:00 -0000 Issue 1213
Subject: RE: [xsl] Re: xsl-list Digest 31 Jul 2007 05:10:00 -0000 Issue 1213 From: "Michael Kay" <mike@xxxxxxxxxxxx> Date: Tue, 31 Jul 2007 15:06:58 +0100 |
> This clarification raises a related naive question, though: > What is the proper use of copy-namespaces="no"? What > namespace nodes will not be copied as a result of using it, > and in what sorts of situations would that be necessary or desirable? consider <soap:soap-envelope xmlns:soap="soap-namespace"> <payload/> </soap> Doing <xsl:copy-of select="payload"/> will give you <payload xmlns:soap="soap-namespace"/>. Using copy-namespaces="no" prevents the namespace being copied. Copying the namespace is necessary if it's used in the content, for example if the element is <payload xsi:type="soap:payload"/>. The system can't tell whether the namespace is used in the content, so it takes the safe default and assumes it is. Usually excess namespaces do no harm, people like to get rid of them to remove visual clutter and to reduce document sizes. Occasionally it is necessary to remove them for other reasons, for example to make a document DTD-valid. Namespaces that are actually used in element and attribute names are copied whether you like it or not. Michael Kay http://www.saxonica.com/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Re: xsl-list Digest 31 Ju, David Carlisle | Thread | [xsl] Problem Dynamically Building , Trish |
Re: [xsl] Re: xsl-list Digest 31 Ju, David Carlisle | Date | [xsl] XSLamenT, Justin Johansson |
Month |