xsl-list
[Top] [All Lists]

RE: [xsl] namespace cleanup for XHTML documents

2006-09-13 09:52:06
read my article:

"Transform XHTML to XHTML with XSLT"
http://www.xmltraining.biz/xhtmlxhtml


-----Original Message-----
From: Wolfgang Jeltsch [mailto:wolfgang(_at_)jeltsch(_dot_)net] 
Sent: 13. september 2006 16:21
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] namespace cleanup for XHTML documents

Hello,

I have a stylesheet which outputs XHTML documents that look like this:

        <?xml version="1.0"?>
        <xhtml:html
                xmlns="http://example.com/";
                xmlns:xhtml="http://www.w3.org/1999/xhtml";>
          <xhtml:head>
            <xhtml:title>Hello</xhtml:title>
          </xhtml:head>
          <xhtml:body>
            <ul xmlns="http://www.w3.org/1999/xhtml";>
              <li>1</li>
              <li>2</li>
            </ul>
          </xhtml:body>
        </xhtml:html>

However, I want those documents to look like this:

        <?xml version="1.0"?>
        <html xmlns="http://www.w3.org/1999/xhtml";>
          <head>
            <title>Hello</title>
          </head>
          <body>
            <ul>
              <li>1</li>
              <li>2</li>
            </ul>
          </body>
        </html>

That is, I want all namespace prefixes and unneeded namespace declarations 
removed and a single default namespace declaration at the top level.

How can I achieve this?

Best wishes,
Wolfgang

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>