|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Exclude result prefixes
xsl:exclude-result-prefixes applies to the literal result element that you place it on, and to any literal result elements textually contained within that one. It doesn't propagate dynamically through apply-templates or call-template. Mike Kay Software AG > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of > David Morris > Sent: 05 August 2001 00:21 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: Re: Exclude result prefixes > > > 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-transit > ional.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 > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








