Jump to content

ned help understanding how xml schema works


Recommended Posts

This is a snippet from an xsd file:

    <schema xmlns=”http://www.w3.org/2001/XMLSchema”      xmlns:target=”http://www.example.com/name”'>http://www.example.com/name”      targetNamespace=”http://www.example.com/name”'>http://www.example.com/name” elementFormDefault=”qualified”>  

1. what's the purpose of targetNamespace attr?


and the XML :

    <?xml version=”1.0”?>      <name      xmlns=”http://www.example.com/name”'>http://www.example.com/name”      xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”      xsi:schemaLocation=”http://www.example.com/name name5.xsd”      >  

1. does the name element must point to the same namespace as the target namespace(or targetNamesace attr?) in the xsd?

2. what's the purpose of schemalocation? and why is there a whitespace there?


Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...