| |   Skin:   
      User: Not logged in 
Newsletter Signup
XSLT Library
Latest XML Blogs
Featured Examples
Featured Articles
Book Chapters
Training Courses
Sign In
My Profile
My Articles
My Examples
My Favorites
My Resources
Add a Resource
About Me
My Blog
HeadGeek Articles
Talking Portfolio
World Trip Pics

Reply: Regarding Schema Namespace ()

Date Posted:12/20/2006 9:24 AM
Posted by:
Mike Parker

   I am looking at tutorials for XML schemas.

The example xml code is listed below. I have had troubles digesting the meaning/purpose of the "namespace for the XML Schema Recommendation". I went to the address that is listed for this example, , and see that it is a documentation page. My question is, do i need to include the  <schema xmlns =  > attribute, or is this just  documentation which is used by convention. (thank you very much for any input)

<?xml version = "1.0" ?>

<schema xmlns = "">

   <element name = "Customer">



            <element name = "FirstName" type = "string" />

            <element name = "MiddleInitial" type = "string" />

            <element name = "LastName" type = "string" />





Date Posted:12/21/2006 3:44 PM
Posted by:
Gerald Schmidt
The namespace declaration is necessary. If, as in your case, the root element defines the default namespace xmlns="", the parser prefixes each tag in your document with the string

Namespace-aware parsers will now report the start tag <element>, for example,  as <>. Without, the xmlns attribute, <element> would not be recognised and the schema itself would be invalid.

Similarly, if you begin the schema as follows:

<xs:schema xmlns:xs="" elementFormDefault="qualified">

A namespace-aware parser will report the start tag <xs:element> as <>.

Fans of "The Office"
Dwight Bobbleheads are here!
  “It's me! I'm the bobblehead! Yes!”

Advertise on XMLPitstop

Advertise on XMLPitstop

EggHead Cafe
Web Servicee development
Buy links on this site!
internet backup
Prada sunglasses
Video Surveillance
Web Designers
Color Laser Printer
Buy links on this site!

Interested in Text ads?
2,277 Total Members
42 members(last 30 days)
13 members(last 7 days)
3 members(today)

1,629 Total Discussions
17 Posts(last 30 days)
2 Posts(last 7 days)
1 Posts(today)

20,047 Total Blog Posts
2,133 Blogs(last 30 days)
573 Blogs(last 7 days)
56 Blogs(today)

8,699 Newsgroup Posts
0 Posts(last 30 days)
0 Posts(last 7 days)
0 Posts(today)

13,802 Total Resources
16 Resources(last 30 days)
1 Resources(last 7 days)
0 Resources(today)


David Silverlight's| 2801 Florida Ave #225|Miami, FL 33133|Ph:305-447-1139