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 post
Share on other sites
  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...