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

Re: namespace - don't like to like the like

Subject: Re: namespace - don't like to like the like
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 25 Sep 2003 16:09:20 +0100
like to like
> Have I missed the obvious and nobody wants to post an answer or else?
If you put a namespace in the stylesheet it should appear in the result.
Which XSLT system are you using?
although you are probably using teh default html output, in which case
the behaviour of namepsaces is rather underspecified in XSLT 1.

In any case, as you are producing xhtml you need to tell xslt not to use
the html output method so add
<xsl:output method="xml"/>
If the namespace still doesn't appear in the result, something is wrong
somewhere... 

Note, you probably don't want to do this:

<xsl:tylesheet ...>
      <xsl:template match="/">
            <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
               .....

as that will just put that html element in the xhtml namespace.

If you are generating xhtml you probably want all output elements to be
in that namespace so instead do

<xsl:tylesheet ... xmlns="http://www.w3.org/1999/xhtml">
      <xsl:template match="/">
            <html lang="en">
               .....
David


________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

 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.