Hello All,
I am using Norman Walsh's XSLTs to transform some DocBook XML content
to HTML.
However I noticed that Norman Walsh's DocBook XSLT includes the
following
tag in the transformed document:
<meta xmlns="http://www.w3.org/1999/xhtml" ......
I think the XML Namespace can only be declared in <html/> tag for
e.g.:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
is the correct way to declare the namespace.
<meta xmlns="http://www.w3.org/1999/xhtml" ...... is what Norman
Walsh's
XSLT produced, which I think is incorrect. I might be wrong.
Before I submit a bug-report to OASIS, I just to make sure that I m
not missing something. Let me know if I am wrong about xmlns
declaration.
Here are some sample documents transformed from DocBook XML to HTML
using Norman's XSLTs: http://www.xml-dev.com/blog/#88
Thanks.
Saqib Ali
------------- http://validate.sf.net <---- (X)HTML / DocBook XML Validator and
Transformer 10 2176
On 5 May 2004 10:39:31 -0700, sa***@stonebeat .org (Saqib Ali) wrote: Before I submit a bug-report to OASIS, I just to make sure that I m not missing something.
Here's a clue - Norman Walsh _really_ knows what he's doing. Many,
many people have also used those stylesheets over and over. I'm not
saying there are no bugs left, but obvious ones get found quickly.
Let me know if I am wrong about xmlns declaration.
Yes.
> >Let me know if I am wrong about xmlns declaration.
Yes.
Can you please be more specific as to where in the XHTML DTD it allows
the xmlns attribute to be in the <META /> TAG ???
I was looking at the XHTML DTD @ http://www.w3.org/TR/xhtml1/#dtds it
seems like xmlns attribute is only allowed in the <html /> TAG.
Can you please point me to the exact location in the DTD, which allows
xmlns attribute to be in the <meta /> tag.
Thanks.
In Peace,
Saqib Ali http://validate.sf.net
"Saqib Ali" <sa***@stonebea t.org> wrote in message news:d2******** *************** ***@posting.goo gle.com... Can you please be more specific as to where in the XHTML DTD it allows the xmlns attribute to be in the <META /> TAG ??? I was looking at the XHTML DTD @ http://www.w3.org/TR/xhtml1/#dtds it seems like xmlns attribute is only allowed in the <html /> TAG.
Observe that the xmlns attribute on the html tag is FIXED. The inference
drawn from this is that all the child elements defined by the DTD must
belong to the same namespace URI, and no others.
The "XML with Namespaces" recommendation (on which XHTML
is based) was created to address this limitation. Inherent in this
recommendation is the freedom to declare namespaces anyplace.
The relationship between XHTML and other namespaces is described
in section 3.1.2 of the XHTML 1.0 recommendation, http://www.w3.org/TR/2000/REC-xhtml1...6/#well-formed
If you must validate against a DTD, since DTDs are incapable of
supporting namespaces, then the XHTML produced by the Doc-
Book XSLT is not strictly conforming. This is due to a known
limitation of the DTD, rather than incongrueity with the XHTML
recommendation.
XHTML 1.1 includes informative XML Schemas, that accomodate
the broader use of XML namespace declarations.
Derek Harmon
In article <d2************ **************@ posting.google. com>,
Saqib Ali <sa***@stonebea t.org> wrote: <meta xmlns="http://www.w3.org/1999/xhtml" ...... is what Norman Walsh's XSLT produced, which I think is incorrect. I might be wrong.
DTDs and namespaces don't work very well together, so it may well be
invalid according to the DTD, and you may just want to ignore that
fact.
Furthermore there may be some variation between XSLT processors as to
what xmlns declarations they output, so it's very hard to guarantee
output that matches a DTD.
However, looking at one of your examples, I'm baffled. The top-level
<html> element doesn't have an xmlns attribute. The #FIXED
declaration in the DTD will give it one when it's read back in again,
but the XSLT processor that generated it didn't know that. In fact,
it looks as if none of the XSLT output except the meta element was in
the XHTML namespace, and that's why it put the xmlns attribute on
the meta element.
The first thing I'd do is try using a different XSLT processor.
Then ask Norm.
-- Richard
> The "XML with Namespaces" recommendation (on which XHTML is based) was created to address this limitation. Inherent in this recommendation is the freedom to declare namespaces anyplace.
The relationship between XHTML and other namespaces is described in section 3.1.2 of the XHTML 1.0 recommendation,
http://www.w3.org/TR/2000/REC-xhtml1...6/#well-formed
Derek,
Thank you very much. This is exactly what I was looking for. :)
In Peace,
Saqib Ali http://validate.sf.net
In article <c7************ @id-185805.news.uni-berlin.de>,
"Derek Harmon" <lo*******@emai l.msn.com> writes: "Saqib Ali" <sa***@stonebea t.org> wrote in message news:d2******** *************** ***@posting.goo gle.com... Can you please be more specific as to where in the XHTML DTD it allows the xmlns attribute to be in the <META /> TAG ??? I was looking at the XHTML DTD @ http://www.w3.org/TR/xhtml1/#dtds it seems like xmlns attribute is only allowed in the <html /> TAG.
You may be talking at cross-purposes. XML namespace rules and DTD
validation rules are different beasts. XHTML, and particularly XHTML1.0,
applies the latter. So <meta xmlns... /> is fine by XML rules but
invalid by XHTML rules.
As for whether the stylesheets are in error - I'd have to spend more
time than I have now to determine whether the error lies there or in
the user. But in reply to Andy's point, Norman Walsh may know what
he's doing, but Saqib in no ignorant newbie either.
Observe that the xmlns attribute on the html tag is FIXED. The inference drawn from this is that all the child elements defined by the DTD must belong to the same namespace URI, and no others.
What FIXED means is that it's implied in the <html> element even when
an author omits it. It doesn't prevent use of other default namespaces
through an xmlns attribute on a child element.
The "XML with Namespaces" recommendation (on which XHTML is based) was created to address this limitation. Inherent in this recommendation is the freedom to declare namespaces anyplace.
The relationship between XHTML and other namespaces is described in section 3.1.2 of the XHTML 1.0 recommendation,
http://www.w3.org/TR/2000/REC-xhtml1...6/#well-formed
This is a case of design by committee pulling in different and
mutually incompatible directions. The only way this actually works
is by defining new DTDs (such as XHTML+MATHML+SV G). Or by dropping
both validation and browser-compatibility.
If you must validate against a DTD, since DTDs are incapable of supporting namespaces,
Not strictly true, but we'll skip over that.
then the XHTML produced by the Doc- Book XSLT is not strictly conforming.
Neither is it valid if it generates xmlns declarations in the manner
described here.
XHTML 1.1 includes informative XML Schemas, that accomodate the broader use of XML namespace declarations.
XHTML 1.1 is a true exercise in futility. It gratuitously breaks
browser-compatibility, but offers nothing in return, beyond what
ad-hoc-XML gives us for free in terms of availability of processing
tools.
Conclusion: XML and HTML each has advantages. But mixing them
requires attention to detail that is often missing.
--
Nick Kew
Nick's manifesto: http://www.htmlhelp.com/~nick/
In article <65************ @webthing.com>,
Nick Kew <ni**@hugin.web thing.com> wrote: What FIXED means is that it's implied in the <html> element even when an author omits it.
*And* that the author may not supply any other value, unlike a plain default.
-- Richard
In article <28************ **************@ posting.google. com>,
Andy Dingley <di*****@codesm iths.com> wrote:
% sa***@stonebeat .org (Saqib Ali) wrote in message
%
% > Can you please point me to the exact location in the DTD, which allows
% > xmlns attribute to be in the <meta /> tag.
%
% It's not in the DTD - xmlns is "magic" (it's part of XML, not XHTML),
% so look at the XML TR instead
It's magic, but if you want to validate against a DTD, you've got to
include the xmlns* attributes, as well as having the prefix consistent
between the instance and the DTD.
--
Patrick TJ McPhee
East York Canada pt**@interlog.c om This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Peter Maas |
last post by:
Hi,
I have a problem parsing html text with xmldom. The following code
runs well:
--------------------------------------------
from xml.dom.ext.reader import HtmlLib
from xml.dom.ext import PrettyPrint
r = HtmlLib.Reader()
|
by: Jon Thackray |
last post by:
I'm trying to use the MathML DTD and stylesheets, but get some
problems with xmlns attributes. If I do something like
<math xmlns="http://...">
....
</math>
then xmllint and xalan in validating mode both complain that math
doesn't have an xmlns attribute. If I leave out the attribute, then
the Mathml stylesheet doesn't format the Mathml content using either
|
by: Saqib Ali |
last post by:
Hello All,
I am using Norman Walsh's XSLTs to transform some DocBook XML content
to HTML.
However I noticed that Norman Walsh's DocBook XSLT includes the
following
tag in the transformed document:
<meta xmlns="http://www.w3.org/1999/xhtml" ......
|
by: Gary Stephenson |
last post by:
I am endeavouring to use .NET v2.0 XML facilities to "roundtrip" reading and
writing XML documents - i.e. to end up with _exactly_ what I started with,
but I can't seem to figure out how to get an XMLReader to report "xmlns"
attributes. It seems to report an
"xmlns='MyDefaultURI'"
with incorrect data, and doesn't appear to report
"xmlns:myprefix="MyPrefixURI"
|
by: clover2411 |
last post by:
Hi there,
Apologies if I'm posting to the wrong group; this one looked to be the
best match.
I'm having trouble writing a bit of XSL/XPATH and wondered if someone
would please shed some light. My XML is generated by InfoPath and of
the structure:
....
| |
by: aglaforge |
last post by:
I'm attempting to write a quick piece of Javascript code that will
validate if the end user of the javascript has the necessary VML
attributes set in their HTML. The problem in IE is that "xmlns:v"
does not appear in their attributes property or the
getAttribute('xmlns:v') calls. The real kicker is that the 'xmlns'
attribute does return something.
The HTML Snippet would look like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0...
|
by: C.W.Holeman II |
last post by:
I have an xmlns attribute that produces an XHTML validation error and I
do not understand why it is considered an error.The file displays as
expected on Firefox and IE7.
http://emle.sourceforge.net/emle020100/lab/ng20070625_emle_lab_001-e.xml.html
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
|
by: cakebread |
last post by:
I'm having problems parsing a file:
<body>Hello world</body>
</html>""")
None
The above works fine with the first element being a simple <html>, but
not when I have all the xmlns's.
|
by: Dormilich |
last post by:
Hi,
I have some problems removing the xmlns attributes from a transformed xml file. I can't completely remove them (so it would validate).
the problematic elements are <div> or the elements pasted by <xsl:copy-of>
if I have no default NS in the XSL file I get the namespace attribute attached to the copied elements (the one from the "plan" prefix because that's default NS of the XML, all prefixed NS are removed).
if I have a default...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |