Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

namespace

Status
Not open for further replies.

NewbieNewGuy

Technical User
Sep 30, 2010
3
I'm trying to incorporate XML into our website and frankly not doing very well. I am using Flash CS4, I have a basic XML file, a very basic schema, both in the same folder as the site files but I am confused by the namespace.

Am I supposed to write my own namespace file or should I reference someone else's?

If you're still with me you'll already know that I'm not very well up on this, yet. Would appreciate any help.

 
>I have a basic XML file, a very basic schema...
>Am I supposed to write my own namespace file or should I reference someone else's?
If by "schema", you mean w3c xml schema document which validates the "XML file", then it defines your "namespace" used in the "XML file", to put the namespace matter in its simplest form.
 
Hi tsuji, thanks for the reply. I am new to XML, whilst I understand what namespace is I can't find reference to how I find it, or where I should reference it.

Is this a file that is permanently available to all web users at "xmlns:xsl=" for example, or do I need to write my own?

Is it simply the case that if I include this line of code in my schema document the computer can always go find what it needs at this website address? Your help is much appreciated...and dare I say, badly needed!
 
>Is this a file that is permanently available to all web users at "xmlns:xsl="[ignore][/ignore]">" for example, or do I need to write my own?

The [ignore][/ignore] is not a file, is not a resource of any kind at all. None of the kind. It is just a name, an indicator, a namespace's name. It can point to nowhere. It can be any form as long as it conforms to certain rule of naming. In this case, it points to the w3c recommendation xslt's namespace name. They elect to use it to designate their namespace. As long as you do not need to validate an xslt document, the story ends here. If you want to validate an xslt document, then you either write one (which is not a small task) according to w3c recommendation or you specify the xsd-schema file for xslt namespace which w3c provisions one (at least).

>Is it simply the case that if I include this line of code in my schema document the computer can always go find what it needs at this website address?
You have to say include it, yes, but in what context. If the schema document is to validate some vacabulary borrowed from xslt, you sure have to provide the info for the computer (program) to find it: that is the xsi:schemaLocation (xsi another namespace) is for. But, that info does not necessarily appeared in the schema document, it can be given from within the program itself-that is the final say of which schema document to validate what.

It is not very easy to get on top of all these and contrary to what one might have the illusion of thinking, tag, closing tag, well-nesting... that's xml... no. It can get much more involved. It takes some time to digest...
 
Hi tsuji,

Thanks for your help, I think I need to read a few more tutorials.

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top