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

Re: Re: Unwanted namespace prefix _0

Subject: Re: Re: Unwanted namespace prefix _0
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Mon, 23 Dec 2013 19:00:04 +0100
Re:  Re: Unwanted namespace prefix _0
Martin Holmes wrote:
Another oddity is this: even if I define a namespace prefix for the
Examples namespace:

xmlns:eg="http://www.tei-c.org/ns/Examples"

in the stylesheet root element, Saxon still uses the _0 prefix in the
output.

It's easy to cleanup with a regex search-and-replace, but it's really
annoying. There must be some way around it, otherwise people would be
asking this question all the time, surely? I assumed I'd just forgotten
something obvious or screwed something up.

Can you post minimal but complete samples allowing us to reproduce the problem?
When I try the input file


<TEI xmlns="http://www.tei-c.org/ns/1.0" version="5.0">
[...]
<div>
<egXML xmlns="http://www.tei-c.org/ns/Examples" valid="true">
  For more information, consult the
  <ref target="mol:linking#linking_graphics"> guide to
  linking graphic content</ref>.</egXML>
</div>
[...]
</TEI>

with the stylesheet

<xsl:stylesheet version="2.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

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

</xsl:stylesheet>

running Saxon-HE 9.5.1.3J from the command line I get the output

<?xml version="1.0" encoding="UTF-8"?><TEI xmlns="http://www.tei-c.org/ns/1.0" version="5.0">
[...]
<div>
<egXML xmlns="http://www.tei-c.org/ns/Examples" valid="true">
For more information, consult the
<ref target="mol:linking#linking_graphics"> guide to
linking graphic content</ref>.</egXML>
</div>
[...]
</TEI>


So how do you run Saxon? Are you sure it is Saxon serializing the result when you get those strange prefixes?

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.