Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / July 2006

Tip: Looking for answers? Try searching our database.

what are xml schemas

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Madhur - 23 Jul 2006 07:43 GMT
Hello

I am a .net developer and normally see the entries like
<webparts xmlns="schemas.microsoft.com/webparts/v2>

I get confused here about what does xmlns refers to and how does the program
locates this schema.

Since this schema refers to internet location, but a normal program doesnt
require an Internet location?

Where is this schema stored and how can I view them?

--
Madhur Ahuja

http://madhurahuja.blogspot.com
Barry Kelly - 23 Jul 2006 11:07 GMT
> I am a .net developer and normally see the entries like
> <webparts xmlns="schemas.microsoft.com/webparts/v2>
>
> I get confused here about what does xmlns refers to and how does the program
> locates this schema.

'xmlns' means an XML namespace, and it is not a schema. The URI referred
to by the 'xmlns' attribute doesn't need to be a valid location from
which stuff can be downloaded. What it does is scope attributes and
elements by the given namespace. It's a little like namespaces in .NET &
C# - it permits the same identifier (an element or attribute in XML) to
be used in different namespaces without conflicting with one another.

> Since this schema refers to internet location, but a normal program doesnt
> require an Internet location?

Even for schemas, XML documents are typically not validated against the
schema unless you use a validating reader. Using a validating reader can
slow things down, so they aren't always used.

> Where is this schema stored and how can I view them?

Schemas are generally in a DTD (document type definition) header at the
start of the document, or in an 'xsd' (XML schema definition) attribute.
There are other schema definition formats too.

-- Barry

Signature

http://barrkel.blogspot.com/

Madhur - 23 Jul 2006 17:19 GMT
>> I am a .net developer and normally see the entries like
>> <webparts xmlns="schemas.microsoft.com/webparts/v2>
[quoted text clipped - 24 lines]
>
> -- Barry

I got your point! But as you said they are just namespaces, If I change
one of them, .NET compilation throws error that this namespace is not a
valid one. I want to know how it determines validity and where this info
is stored.
For ex .dwp file use namespace
schemas.microsoft.com/webparts/v2
while the v3 of .dwp file use
schemas.microsoft.com/webparts/v3

I dont see this info documented anywhere, and how can I see the difference
between two.

--
Madhur Ahuja

http://madhurahuja.blogspot.com
Barry Kelly - 23 Jul 2006 21:22 GMT
> >> I am a .net developer and normally see the entries like
> >> <webparts xmlns="schemas.microsoft.com/webparts/v2>

> I got your point! But as you said they are just namespaces, If I change
> one of them, .NET compilation throws error that this namespace is not a
> valid one. I want to know how it determines validity and where this info
> is stored.

If you change the namespace, it's as if you changed the element name -
if the program is XML namespace aware, it won't recognize the element at
all.

No schema needs to be anywhere for this to occur - the program may be
reading hard-coded namespace-element name pairs from the XML.

> For ex .dwp file use namespace
> schemas.microsoft.com/webparts/v2
[quoted text clipped - 3 lines]
> I dont see this info documented anywhere, and how can I see the difference
> between two.

The difference between the two is that one ends in '2' and the other in
'3', it seems to me.

-- Barry

Signature

http://barrkel.blogspot.com/

Chris Mullins - 23 Jul 2006 19:19 GMT
> I am a .net developer and normally see the entries like
> <webparts xmlns="schemas.microsoft.com/webparts/v2>
>
> I get confused here about what does xmlns refers to and how does the
> program
> locates this schema.

http://www.google.com/search?complete=1&hl=en&q=xml+schema

--
Chris Mullins

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.