Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: namespace using conventions

From: "Pavils Jurjans" <pavils@-------.----.-->
To: NULL
Date: 5/5/2004 7:17:00 PM
Hello Martin,

Thanks for your comments.

> my: is not a namespace, it is a prefix that you could associate with a
> namespace but the namespace should look different.

Of course, that's true. I am sort of new to the use of XML terms. I use to
say, "let's have this kind of tag in "my" namespace, etc, etc. On one hand,
it's much handier, since most of XML documents standards prefer to use some
"default" prefix. On the other hand, it of course does not guarantee that
"svg" prefix is not linked to some very different namespace.

>
> If you really want to use XHTML then you should use the right namespace
> for those elements like the <div> element e.g.
>    <my:special xmlns:my="http://example.com/2004/05/pavel"
>                value="ABC">
>     <div xmlns="http://www.w3.org/1999/xhtml">Some HTML content here</div>
>    </my:special>
>

Is there some way how to define all the namespaces in the very beginning of
the XML file, so that XML code is less messed up wil all those URNs?

Would this be the right way? ("template" tag is the document object tag)


<my:template xmlns:my="http://www.domain.com/xml/ns/my">
...
<my:whatever>Now I can use "my" prefix without defining xmlns:my
attribute</my:whatever>
...
<xhtml:div xmlns:xhtml="http://www.w3.org/1999/xhtml">Some HTML content
here</div>
...
<xhtml:div>May I skip the namespace attribute now?</div>
...
<div>Can I somewhere tell the XML treat all tags without explicit prefix
being in xhtml namespace?</div>
...
</my:template>


Actually, what's the convention - what to put in the namespace URN? Would
that be an existing web page? I've seen namespaces not refering to any http
source at all.


Regards,

Pavils




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent