Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

schema targetNamespace attribute

Posted on 2015-02-05
1
Medium Priority
?
108 Views
Last Modified: 2015-02-05
Can someone please explain what this means:

It is important to remember that many XML 1.0 documents are not associated with namespaces at all. To validate these documents, it is necessary to use a schema that doesn't have a targetNamespace attribute.

What would be the problem with the schema having a targetNamespace attribute if the XML instance document isn't associated with a namespace?
0
Comment
Question by:SAbboushi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 2000 total points
ID: 40592058
the targetNamespace in a schema puts the elements declared in that schema in a namespace.
if the schema has a targetNamespace it means you need to associate the elements in the instance that needs validation by that schema with that namespace

if schema has targetnamespace "urn:com:foo"
and there is an element declaration in that schema
<xs:element name="bar">

Then

<foo:bar xmlns:foo="urn:com:foo">....
refers to the element declared in that schema by prefix binding

<bar xmlns="urn:com:foo">....
refers to the element declared in that schema by default binding

<bar>....
has no relation at all with the element declared in the schema
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa‚Ķ
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question