Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 01-10-2008
Member
 
Join Date: May 2008
Posts: 23
XML - XSD: What is elementFormDefault="qualified" for?

Having just started a new job I have been thrown in the deep end with some heavy XML work so I am finding my feet and I am sure that this will be the first of many posts on here!

My first question is to do with Complex Types in XSD. I have figured out what a complex type is, and I have found that what the API provider is doing, is to do <xs:extension /> in a secondary set of XSDs.

What I have noticed is that at the top of the XSD in the <xs:schema /> opening tag, it says elementFormDefault="qualified" - and I was just wondering if somebody could tell me what it is there for because I can't find any documentation on what it does?
Reply With Quote
  #2  
Old 01-10-2008
Member
 
Join Date: Feb 2008
Posts: 1,848
elementFormDefault="qualified" declaration indicates that all elements, even local (i.e., those defined within complexType) should be qualified in the instance documents.
Reply With Quote
  #3  
Old 01-10-2008
Member
 
Join Date: May 2008
Posts: 23
Thanks MindSpace, I know that you're answer is spot-on but still with my newbie hat on - what does "qualified" mean?

I know that is a very novice question, but as I say, I am really new to all this!

Many thanks.
Reply With Quote
  #4  
Old 01-10-2008
Member
 
Join Date: Apr 2008
Posts: 2,001
All "qualified" elements and attributes are in the targetNamespace of the schema and all "unqualified" elements and attributes are in no namespace. All global elements and attributes are qualified.
Reply With Quote
  #5  
Old 01-10-2008
Member
 
Join Date: Apr 2008
Posts: 1,948
"Qualified", in XML terms, means "Associated with a namespace, either by the use of a declared prefix or via a default namespace declaration".

As to what elementFormDefault means: It indicates "whether or not locally declared elements and attributes must be unqualified."
Reply With Quote
  #6  
Old 01-10-2008
Member
 
Join Date: Jan 2008
Posts: 1,515
Element form default is kept qualified when the namespace is not needed to be hidden in the xml document or instance document .That means for all the elements in the xml document you have to prefix the namspace variable also. All the elements in the instance document must have namespace variables prefixed with them.

Element form default is kept unqualified when the namespace needs to be hidden in the xml schema itself and need not be exposed in the instance document. That means all the elements that are used in the xml document don't have to be prefixed with the namspace variables. Only the root element has to be prefixed with the namespace variable.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "XML - XSD: What is elementFormDefault="qualified" for?"
Thread Thread Starter Forum Replies Last Post
msiexec.exe Application Error "The instruction at "0x00f33fe8" referenced memory at "0x00f33fe8". The memory could not be "written"." haritable Office Setup 3 10-01-2014 10:40 AM
<input type="button" value="Enregistrer" onclick="location.href=../asp/PRaces.asp"> Luz Software Development 6 18-05-2010 12:27 AM
Power Mgt: "Turn off monitor" "Never" always reverts to "After 20 mins" akbar Windows XP Support 3 25-06-2009 03:49 AM
"The instruction at "0x77fcaff8" referenced memory at "0x00000000". The memory could not be "written". maketu Window 2000 Help 2 24-12-2008 05:06 PM
Adding commands to "Folder Options/Edit File Type/Actions" grayed-out "Edit" & "Remove" Green_XP Windows XP Support 1 06-11-2007 02:18 PM


All times are GMT +5.5. The time now is 09:09 AM.