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

Re: Specifying the XHTML XMLNS

Subject: Re: Specifying the XHTML XMLNS
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 28 Sep 2005 16:03:27 +0100
xhtml xmlns
> Of course not. I have posted the "original" stylesheet that didn't
> include the xmlns declaration. If I make the change you suggest, the
> XSLT becomes (the same but with an extra xmlns declaration in
> xsl:stylesheet tag):

well not really, I meant that the result you posted was not generated by
your stylesheet _after_ you had added the xmlns declaration.

You said that it had xmlns on this link element:

  <link rel="stylesheet" href="./css/login.css" type="text/css" xmlns=""></link>

But  in this message when you post the entire result, note that link
does not have xmlns.

Note that the script element generated in the stylesheet also doesn't
have xmlns="" either.

Presumably the script that does have this has been copied from the
source. If you have a source element script-in-no-namespace and want to
generate script-in-html this (to xslt) is just like saying you have an
element <a> and want to generate <b>. You can do it but it is _not_ a
copy so you don't want

  <xsl:template match="@*|node()">
    <xsl:copy>
      <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
  </xsl:template>


You probably want a default template that renames elements, giving thenm
the same name but the xhtml namespace, which would be

  <xsl:template match="node()">
    <xsl:element name="{local-name()}">
      <xsl:copy-of select="@*"/>
      <xsl:apply-templates/>
    </xsl:element>
  </xsl:template>

which will make elements in the xhtml namespace if that is the current
default.

David



________________________________________________________________________
This e-mail has been scanned for all viruses by Star. 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
________________________________________________________________________

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.