Subject: RE: [xsl] xsl to xsl doing it right From: "Darrin Bishop" <dbishop@xxxxxxxxxxxxxxxxx> Date: Wed, 4 Apr 2001 13:25:04 -0500 |
I think this is what you need. <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <!-- change here --> <xsl:namespace-alias stylesheet-prefix="alex" result-prefix="xsl"/> <!-- change here --> <xsl:output method="xml"/> <!-- change here --> <xsl:template match="/"> <alex:stylesheet version="1.0"> notice that result-prefix attrib is xsl which is linked to "http://www.w3.org/1999/XSL/Transform" .... -----Original Message----- From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Alex Reuter Sent: Wednesday, April 04, 2001 12:44 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: [xsl] xsl to xsl doing it right Hello List, Thanks for all your help. There's something weird going on though in my attempt to implement your suggestions. Here is my namespace aliasing code... <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:alex= "alex-namespace" > <xsl:namespace-alias stylesheet-prefix="xsl" result-prefix="alex"/> <xsl:output method="xsl"/> <xsl:template match="/"> <alex:stylesheet version="1.0"> The xml is processed correctly and everything seems to work properly except....In the output alex is not replaced with xsl. hmmmmm..... Any more suggestions? Thanks again! Alex -----Original Message----- From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Simon Wickes Sent: Tuesday, April 03, 2001 4:26 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: [xsl] xsl to xsl doing it right At 03:57 PM 4/3/01 -0400, you wrote: >Hello, >I'm trying to output an xsl using xsl and am having a hard time >distinguishing which parts i want the processor to actually process and >which parts are meant to be straight output. <xsl:text> doesn't seem to be >any help and <![CDATA escapes all the brackets making the output useless. >Any suggestions? Doh. OK, the preferred method is to use namespace-alias: <xsl:namespace-alias stylesheet-prefix="simon" result-prefix="xsl"/> and then your xsl looks like this <xsl:template match="/"> <simon:template match="whatever">.... much cleaner. Simon xmlgeek@xxxxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Unique headers, Dan Diebolt | Thread | RE: [xsl] xsl to xsl doing it right, Alex Reuter |
Re: [xsl] XML, XSL and SVG, Johannes Döbler | Date | RE: [xsl] xsl to xsl doing it right, Alex Reuter |
Month |