How to define a namespace properly?

K

K Viltersten

I've been hinted to use the following in
order to get rid of the warnings that i
get when enhancing my document with JS.

<html
xmlns=http://www.w3.org/1999/xhtml
xmlns:ext="http://mycontrolschemapath">

I don't see what should be put at the
second location, i.e. xmlns:ext. The
first one leads to a page with
definitions for HTML but nothing that a
computer could "use".

Is there a special site for JS-schemas?
 
M

Martin Honnen

K said:
I've been hinted to use the following in
order to get rid of the warnings that i
get when enhancing my document with JS.

<html
xmlns=http://www.w3.org/1999/xhtml
xmlns:ext="http://mycontrolschemapath">

I don't see what should be put at the
second location, i.e. xmlns:ext. The
first one leads to a page with
definitions for HTML but nothing that a
computer could "use".

Are you trying to author XHTML 1? In that case, yes, you need
<html xmlns="http://www.w3.org/1999/xhtml">
to make sure the browser recognizes the elements as being XHTML 1
elements, at least when you serve your documents with an XML or XHTML
MIME type so that the browser uses an XML parser.

I don't understand why you think you need the
xmlns:ext="http://mycontrolschemapath"? You are talking about getting
"rid of the warnings" but it is not clear to me what kind of warnings
that are? Are you trying to validate your markup with validator and that
gives you warnings? Which ones exactly?
 
K

K Viltersten

I've been hinted to use the following in
I don't understand why you think you need the
xmlns:ext="http://mycontrolschemapath"? You are talking about getting "rid
of the warnings" but it is not clear to me what kind of warnings that are?
Are you trying to validate your markup with validator and that gives you
warnings? Which ones exactly?

In Visual Studio, when i use a package like
ExtJS, i get parts of my code highlighted
as incorrect, which is ennoying. Since VS
doesn't recognize them automatically, i was
hinted to define a namespace.

The exact error message is as follows.
"Warning 5 Unrecognized namespace 'ext'.
C:\...\test\donkey.aspx 52 8 C:\...\test\"
 
L

Lasse Reichstein Nielsen

K Viltersten said:
I've been hinted to use the following in
order to get rid of the warnings that i
get when enhancing my document with JS.

In a later message you say that Visual Studio are
giving the warnings. My suggestion is to ask in a
Visual Studio newsgroup instead.

The value should be quoted in XHTML.
xmlns:ext="http://mycontrolschemapath">

I don't see what should be put at the
second location, i.e. xmlns:ext. The
first one leads to a page with
definitions for HTML but nothing that a
computer could "use".

The XML namespace should specify the XML elements
and attributes that are specific to the "ext" elements,
so that a validating XML parser can check the document
structure ...
Is there a special site for JS-schemas?

.... but that makes no sense. XML schema are for XML, not
Javascript, and an XML namespace shouldn't change anything
wrt. Javascript warnings.

/L
 
K

K Viltersten

I've been hinted to use the following in
In a later message you say that Visual Studio are
giving the warnings. My suggestion is to ask in a
Visual Studio newsgroup instead.

I'd like to argue that it isn't a VS related
matter. It has to do with the fact that the
part of my code that refers to JavaScript,
i.e. the package ExtJS, isn't regarded as
legal code, since the keywords are not
recognized. Hence, i'm wondering how to
write CORRECT code, rather than hot to
remove the error/warning highlighting of a
certain IDE. Am i mistaken?
... but that makes no sense. XML schema are for XML, not
Javascript, and an XML namespace shouldn't change anything
wrt. Javascript warnings.

Ah, got it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top