Subject: Re: [xsl] Exclude result prefixes From: "David Morris" <dmorris@xxxxxxxxxxxxx> Date: Sat, 04 Aug 2001 17:20:32 -0600 |
Michael, I tried this with Saxon and Xalan. It seemed so likely that I just did something that would be obvious I didn't include any of the source, but here is a sample of what I tried: Source document: <deliveries> <load scale-type="DTL"> <vendor>... stuff ommitted <url xlink:href="http://www.xxx.com/"/> </vendor> </load> </deliveries> lots of stuff ommitted. XSL: <?xml version='1.0' encoding="ISO-8859-1"?> <!-- Convert deliveries from XML to HTML --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0"> <xsl:output method="xml" indent="yes" encoding="iso-8859-1" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" /> <xsl:template match="/"> <html xmlns="http://www.w3.org/1999/xhtml" xsl:exclude-result-prefixes="xpath"> <xsl:apply-templates /> </html> </xsl:template> <xsl:template match="deliveries"> <head><title>Deliveries</title> </head> <body> <xsl:apply-templates /> </body> </xsl:template> ...lots of stuff omitted Not sure it that is enough to go on but if it isn't I would be happy to supply more. This happened with recent versions and with two processors so I bet it just something I did. It is not that important to exclude the namespace declarations, but I hate not understanding why it didn't work for me. Thanks, David Morris >>> mbnospam@xxxxxxxxxxx 08/04/01 09:31 AM >>> On Saturday, August 04, 2001 2:42 PM David Morris wrote: >I tried to use the <xsl:exclude-result-prefixes> to get rid of some >namespace declarations for namespaces that are not part of my >output documents. This removed the unneccesary namespaces > declaration from the element that I used it on (the root), but that >just made caused the declaration to come back on the root's children. Suggests you either used the element incorrectly, or have a buggy processor. A sample of your use, plus processor info, would help. Michael --------------------------------------------------------- Michael Beddow http://www.mbeddow.net/ XML and the Humanities page: http://xml.lexilog.org.uk/ --------------------------------------------------------- > 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] Exclude result prefixes, Michael Beddow | Thread | RE: [xsl] Exclude result prefixes, Michael Kay |
RE: [xsl]   vs  , Michael Kay | Date | RE: [xsl] Exclude result prefixes, Michael Kay |
Month |