473,473 Members | 2,178 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

dropping namespace declarations in output

Hi All,

I'm sure this is possible, but I haven't seen how it's done.

I'm generating XHTML from XML using Saxon (6.5.3). My output files end
up with the namespace declarations from the stylesheet and input files.
This is preventing them from validating correctly at w3.

The xmlns attributes don't actually affect page display, but it'd be
nice to have the pages validate cleanly. How can I stop the namespace
declarations from being put in my output file?
Keith
--
Keith Davies
ke**********@kjdavies.org
"Some do and some don't. I *hate* that kind of problem."
"Understandable. Consistency is important with fuck ups."
Jul 20 '05 #1
2 1244


Keith Davies wrote:

I'm generating XHTML from XML using Saxon (6.5.3). My output files end
up with the namespace declarations from the stylesheet and input files.
This is preventing them from validating correctly at w3.

The xmlns attributes don't actually affect page display, but it'd be
nice to have the pages validate cleanly. How can I stop the namespace
declarations from being put in my output file?


<xsl:stylesheet exclude-result-prefixes="prefix1 prefix2"
xmlns:prefix1="http://example.com/2004/08/whatever"
xmlns:prefix2="http://example.com/2004/08/whatelse"
but for that to work you can't have any result elements using those
namespaces.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2
On 2004-08-15, Martin Honnen <ma*******@yahoo.de> wrote:


Keith Davies wrote:

I'm generating XHTML from XML using Saxon (6.5.3). My output files end
up with the namespace declarations from the stylesheet and input files.
This is preventing them from validating correctly at w3.

The xmlns attributes don't actually affect page display, but it'd be
nice to have the pages validate cleanly. How can I stop the namespace
declarations from being put in my output file?


<xsl:stylesheet exclude-result-prefixes="prefix1 prefix2"
xmlns:prefix1="http://example.com/2004/08/whatever"
xmlns:prefix2="http://example.com/2004/08/whatelse"
but for that to work you can't have any result elements using those
namespaces.


Thank you very much. I didn't think to check stylesheet attributes
(I did check xsl:output, xsl:document, xsl:result-document...)
Keith
--
Keith Davies
ke**********@kjdavies.org
"Some do and some don't. I *hate* that kind of problem."
"Understandable. Consistency is important with fuck ups."
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mads Orbesen Troest | last post by:
Hi, If I have an XSLT sheet transforming elemens from the "myns" namespace into xhtml, the "myns" namespace is declared automatically in the output xhtml, even if not used. I can't seem to...
3
by: Mike Dickens | last post by:
hi, i'm sure this has come up before but havn't managed to find an answer. if i have the following xslt <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet method="xml" version="1.0"...
8
by: Douglas | last post by:
**** Post for FREE via your newsreader at post.usenet.com **** Hello, The following code does not compile if line 3 is uncommented "using namespace std". I do not understand it. Could...
8
by: Gustaf Liljegren | last post by:
I'm using XmlTextWriter to generate an XML document. I can't figure out how to get more than one namespace declaration in an element, when there is no WriteNamespaceDeclaration() method. Thanks,...
32
by: toolmaster | last post by:
Since many of the modern computer languages have built-in namespace features, I can't understand why not add this feature into standard C. I've heard many people complain of the lacking of...
8
by: Simon Brooke | last post by:
I was debugging a new XML generator tonight and trying to determine why it wasn't working; and realised my dom printer does not output XML namespace declarations. My method to output an Element...
4
by: Samuel R. Neff | last post by:
I'm writing an xslt in vs.net 2003 and in order to get intellisense on the html content I added the default namespace declaration xmlns="http://schemas.microsoft.com/intellisense/ie5". However,...
10
by: Andy Fish | last post by:
hi, I have an XSLT which is producing XML output. many of the nodes in the output tree contain namespace declarations for namespaces that are used in the source document even though they are...
12
by: Taras_96 | last post by:
Hi everyone, AFAIK external linkage allows you to refer to variables/functions outside of the current translation unit. A variable in an unnamed namespace is similar to declaring a static...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.