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

xmlns:xi attributes getting into HTML output

Subject: xmlns:xi attributes getting into HTML output
From: "Michael B Allen ioplex@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 26 Oct 2022 14:44:45 -0000
 xmlns:xi attributes getting into HTML output
Hello,

Why is the xmlns:xi attribute ending up in my HTML and how do I exclude it?

XML:

<?xml version="1.0"?>
...
<html xmlns:xi="http://www.w3.org/2001/XInclude">
...
  <header>
    <a href="somepage.html" alt="SOMECOMPANY">
      <img src="images/logoblue80.png" alt="SOMECOMPANY"/>
      <small>Some Small Text</small>
    </a>
  </header>

XSLT:

<?xml version="1.0"?>
<xsl:stylesheet version="2.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"
    encoding="UTF-8"
    indent="no"/>
...
<xsl:template match="header">
    <header>
        <xsl:apply-templates select="@*|node()"/>
    </header>
</xsl:template>

HTML OUTPUT (see xmlns:xi in anchor element):

  <header><a xmlns:xi="http://www.w3.org/2001/XInclude"
href="somepage.html" alt="SOMECOMPANY">
      <img src="images/logoblue80.png" alt="SOMECOMPANY">
      <small>Some Small Text</small>
    </a></header>

The XSLT processor is PHP's XSLTProcessor::transformToXML.

Mike

-- 
Michael B Allen
Java Active Directory Integration
http://www.ioplex.com/

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.