Namespaces on Schemas



Hello all!

I need to build an XML file structure so a client can import data to
one of our systems. Totally new to XML, I learned about Namespaces and
DTD, and built a nice spec using them. Now I am trying to use XML
Schemas to tell more about what kind of data are allowed on each
element/attribute, but I can't understand how to mix Namespaces and
Schemas.

Can anyone give me tips, starting points, about how to specify the
Schema for the following example XML?

<library xmlns:book="book" xmlns:author="author">
<book:book>
<book:title>Example</book:title>
<book:pages>150</book:pages>
</book:book>
<author:author>
<author:title>Mr</author:title>
<author:name>Julio Nobrega</author:name>
</author:author>
</library>

I want to say that the <title> tag has different validation rules
depending on the namespace...

Thank you!

--
Julio Nobrega
http://www.inerciasensorial.com.br

.



Relevant Pages

  • Re: getting rid of NS0 (name space) in xml tags
    ... our partner is using bts2004 and I'm using ... My envelope/document schemas ... I am not too surprised or bothered that the inbound xml is ... As I know U can ignore the prefixes if U don't want to use the namespaces ...
    (microsoft.public.biztalk.general)
  • Re: namespace?
    ... I think it's a bit funny that the new MS stuff, I forget the name maybe it was WCF?, was almost back to comma delimited and they talked about cutting down on the data being sent across the net in comparison to XML. ... Honestly I think if the standard for web service namespaces was ACME/employees/HR instead of http://www.ACME.com/employees/HR it would have made more sense to me as it doesn't carry the connotation that it's a web address. ... The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: XmlSerializer: deserialize against xsd generated class
    ... If there are 5 namespaces in the XML do I need to add a namespace for each ... I did find a code snippet that removes the "empty" nodes ... public partial class Request_TypeMessageTypeFieldTag4000 { ...
    (microsoft.public.dotnet.xml)
  • Re: namespace?
    ... confusion of using URL's as namespace names. ... Honestly I think if the standard for web service namespaces ... It is an XML standard per the World Wide Web Consortium. ... reason for needing namespaces in XML is because the very nature of XML ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: namespace?
    ... just for web service use. ... It is an XML standard per the World Wide Web Consortium. ... reason for needing namespaces in XML is because the very nature of XML ... Microsoft MSDN Online Support Lead ...
    (microsoft.public.dotnet.framework.webservices)