[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Exclude result prefixes

Subject: Re: Exclude result prefixes
From: "David Morris" <dmorris@xxxxxxxxxxxxx>
Date: Sat, 04 Aug 2001 17:20:32 -0600
xsl 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-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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.