Subject: Re: [xsl] Adding namespaces to output From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Tue, 24 Dec 2002 10:56:35 -0500 |
> <xsl:copy-of select="$dummy/*/namespace::*[name(.)='p']"/>
I am exploiting the fact that I know exactly what the RTF looks like because I
created it in the variable. Therefore I know the namspace node is the only
one and its at position one of the first element. I don't think there is any
way this can be wrong in a 1.0 conforming processor. Having said that your
solution will clearly be more resiliant to anybody hacking the variable
around.
T:\ftemp>type kevin.xml <p:a xmlns:p="something"/> T:\ftemp>type kevin.xml.shw SHOWTREE Stylesheet - http://www.CraneSoftwrights.com/s/ Processor: SAXON 6.5.2 from Michael Kay 1 Element '{something}p:a': 1.I Namespace 'xml': {http://www.w3.org/XML/1998/namespace} 1.II Namespace 'p': {something} T:\ftemp>
-- Upcoming hands-on in-depth XSLT/XPath and/or XSL-FO: - North America: Feb 3 - Feb 7,2003
G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) ISBN 0-13-065196-6 Definitive XSLT and XPath ISBN 0-13-140374-5 Definitive XSL-FO ISBN 1-894049-08-X Practical Transformation Using XSLT and XPath ISBN 1-894049-10-1 Practical Formatting Using XSL-FO Next conference training: 2003-03-03,06
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Adding namespaces to outp, Kevin Jones | Thread | Re: [xsl] Adding namespaces to outp, Kevin Jones |
Re: [xsl] Adding namespaces to outp, Kevin Jones | Date | [xsl] How to output open/close tags, Edward L. Knoll |
Month |