- From: <DPawson@rnib.org.uk>
- Date: Thu, 3 Jan 2002 15:03:12 -0000
- To: elharo@metalab.unc.edu, xsl-editors@w3.org
> -----Original Message----- > From: Elliotte Rusty Harold [mailto:elharo@metalab.unc.edu] > At 3:25 AM -0500 1/3/02, DPawson@rnib.org.uk wrote: > >In XSLT 1.0, in order to write a template driven stylesheet, > >I need to explicitly add a namespace to any element that I create. > > > ><xsl:template match="el"> > ><el1 xmlns="some url"> > ><xsl:apply-templates/ > ></xsl:template> > > > > > >Is it reasonable to request that a stylesheet attribute be > >added to cause all elements to be output in a given namespace? > > > > No, at least not beyond what namespace aliasing gives you now in 1.0. > > Your use case is fully handled in 1.0 as follows: > > <xsl:stylesheet version="1.0" xmlns:xsl=""http://yadda yadda yadda" > xmlns="some url"> > > <xsl:template match="el"> > <el1> > <xsl:apply-templates/> > </el1> > </xsl:template> > > </xsl:stylesheet> > > In general literal result elements have the same namespace in the > stylesheet they do in the output document. The only exceptions ar > every special cases like generating XSLT from XSLT, and for these > cases xsl:namespace-alias is fully adequate.. In which case, where there are no ns declared in the source document, they are output with <el xmlns=""> which is what I'm trying to resolve. I could do a pre-process, to include the ns in the source, but that's a kludge. My use case might be to take a home brewed DTD based document, which I'm targetting at XHTML. Regards DaveP - NOTICE: The information contained in this email and any attachments is confidential and may be legally privileged. If you are not the intended recipient you are hereby notified that you must not use, disclose, distribute, copy, print or rely on this email's content. If you are not the intended recipient, please notify the sender immediately and then delete the email and any attachments from your system. RNIB has made strenuous efforts to ensure that emails and any attachments generated by its staff are free from viruses. However, it cannot accept any responsibility for any viruses which are transmitted. We therefore recommend you scan all attachments. Please note that the statements and views expressed in this email and any attachments are those of the author and do not necessarily represent those of RNIB. RNIB Registered Charity Number: 226227 Website: http://www.rnib.org.uk
Received on Thursday, 3 January 2002 10:01:36 UTC