Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3848958
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T16:46:50+00:00 2026-05-19T16:46:50+00:00

I have limited knowledge of XML/Schema files. So this should be a fairly simple

  • 0

I have limited knowledge of XML/Schema files.

So this should be a fairly simple question.
How do you specify a local file for the schemaLocation?

<?xml version="1.0"?>

<note
  xmlns="http://www.w3schools.com"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.w3schools.com note.xsd">
  ...
</note>

This is a sample from http://www.w3.org and the part that specifies schema is in schemaLocation.
I tried looking at the documentation, but how can you specify a local file?

Something like

xsi:schemaLocation="../relativepath/schemafolder not.xsd">

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T16:46:51+00:00Added an answer on May 19, 2026 at 4:46 pm

    schemaLocation has to contain two values separated by whitespace: the namespace URI (this doesn’t change) and the schema url.

    So in your case

     xsi:schemaLocation="http://www.w3schools.com ../relativepath/schemafolder/note.xsd">
    

    Don’t be fooled by the namespace URI being a seemingly valid http url, that’s just one of the little madnesses XML people invented. 🙂

    Actually, you can specify schemas for several namespaces in one schemaLocation:

    xsi:schemaLocation="namespace1 schemaurl1 namespace2 schemaurl2 ..."
    

    (I also advise you to use relative paths with care: while they are extremely useful when you move your files around but still validate it with the same code (or tool), when you deploy your validation code in an application, the “working directory” might not be what you expected. That is not to say you shouldn’t use relative paths, just to be aware of this when you get a weird looking exception about the schema not found.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I honestly have only started recently researching this so my knowledge is limited. I
I have a fairly limited knowledge of Java development. I came across the following,
I have limited knowledge of Java-based technologies, and for business enforced reasons, I may
Excuse my ignorance. My knowledge of regular expressions is extremely limited. I have the
I have limited experience with .net. My app throws an error this.dateTimeFormat is undefined
I have limited knowledge of php and mysql, I am trying to learn it
Since I still have a limited knowledge of LINQ, I figured I would ask
I'm new to design patterns, and thus have a limited knowledge of what all
I'm specificaally a photoshop web designer and have a limited knowledge of xaml. I'm
I have very limited coding knowledge of OpenGL/Glut. I'm supposed to build house and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.