XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 23rd, 2004, 04:48 PM
pillai_p pillai_p is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 5 pillai_p User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
How does parser understand default namespace?

Hi,
I have just started working on XML. I noticed that tags which are defined in well known namespaces can be used in the schema that I create, after specifying the url in the header and using proper prefixes. What I am not so sure is how does the parser come to know of all the elemenets defined in a namespace (for example in xmlns:xdb="http://xmlns.oracle.com/xdb"). Is this info stored somewhere inside the parser or somewhere on the computer where oracle is installed or does it go to the actual site or what?
Any info or links which explains this would be appreciated.

regds,
p

Reply With Quote
  #2  
Old July 24th, 2004, 08:19 AM
fpmurphy fpmurphy is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: USA
Posts: 305 fpmurphy User rank is Corporal (100 - 500 Reputation Level)fpmurphy User rank is Corporal (100 - 500 Reputation Level)fpmurphy User rank is Corporal (100 - 500 Reputation Level)fpmurphy User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 7 h 17 m 54 sec
Reputation Power: 7
The following FAQ should help you:

http://www.rpbourret.com/xml/NamespacesFAQ.htm

Reply With Quote
  #3  
Old July 26th, 2004, 12:06 PM
pillai_p pillai_p is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 5 pillai_p User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
More questions...

Thank you Murphy for the link. It provided me with a lot of info.
I still have one 'practical' question that I would lilke tto put across..
Here it goes.. I was trying to define a schema of my own. and the first line went something like this:
<schema targetNamespace="http://abcd.com/abcd.xsd" elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb">

My understanding it that the namespace denoted by 'http://www.w3.org/2001/XMLSchema'(which in this case is set to default) has elements and attributes(like for example complexType or sequence etc) which I can use to define my own schema. Another namespace also being used is denoted by 'http://xmlns.oracle.com/xdb' and has its own set of element names.

My questions:
1. The strings used for the namespace like http://xmlns.oracle.com/xdb need not actually be mapped to anything on the internet. And my schema only includes the string info in my schema document. So how does the parser know the underlying schema, the elements of which I am using? How does it know for example the sequence in which elements can be defined? Or for that matter what an element like <complextype> could mean? How does it get to know the information that is there in the schema of the namespace?

2. I also noticed that the parser throws up an error if I write 'http://www.w3.org/2000/XMLSchema' instead of 'http://www.w3.org/2001/XMLSchema'. However if I write 'http://xmlns.oracle.com/xd1b' instead of http://xmlns.oracle.com/xdb, if does not complain... Does it mean that details of 'http://www.w3.org/2000/XMLSchema' is somehow hardcoded into the parser that XMLSpy uses(Btw I am using XMLSpy)?

Hope somebody helps me clear up the muddle that I have gotten myself into...

Rgds,
P

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > How does parser understand default namespace?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT