[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] Why is copy-namespaces="no" required?
Subject: Re: [xsl] Why is copy-namespaces="no" required? From: David Carlisle <davidc@xxxxxxxxx> Date: Wed, 18 Nov 2009 12:36:34 GMT |
> Why is copy-namespaces="no" required to avoid duplication of namespace > declarations because you have used <xsl:element name="{name(.)}" namespace="{namespace-uri(.)}"> rather than simply <xsl:copy> to generate the parent element this means that the only namespace node on the parent is the one bound to xs: so when you copy the children any other namespaces that are copied have to be declared on each child. If you only want then declared once you need them to be in scope on the parent and <xsl:element name="{name(.)}" namespace="{namespace-uri(.)}"> is essentially the xslt 1 vesrsion of copy-namespaces="no" and explictly does not copy namespaces. > Is there a simple way of passing in a list of N pathnames in a param If you are calling it from the java spi then you can construct any XDM value and pass it in, from teh command line do saxon a.xml style.xsl doclist="1.xml 2.xml 3.xml" then you can do <xsl:param name="doclist"/> <xsl:variable name="docs" select=" for $d in tokenize($doclist,'\s+') return doc($d)"/> then <xsl:copy-of select="$docs/xs:schema/xs:complexType " would copy all the complex type elements from all the documents. David ________________________________________________________________________ The Numerical Algorithms Group Ltd is a company registered in England and Wales with company number 1249803. The registered office is: Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom. This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. ________________________________________________________________________
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Why is copy-namespaces="no" r, Wolfgang Laun | Thread | Re: [xsl] Why is copy-namespaces="n, Wolfgang Laun |
[xsl] Why is copy-namespaces="no" r, Wolfgang Laun | Date | Re: [xsl] Why is copy-namespaces="n, Wolfgang Laun |
Month |
Keywords