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 9241327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:21:06+00:00 2026-06-18T08:21:06+00:00

I have a conceptual question concerning XML-namespaces: If I have two different xsd-Files in

  • 0

I have a conceptual question concerning XML-namespaces:
If I have two different xsd-Files in a folder hierarchy:

fileA.xsd
folder/
    fileB.xsd

and in each of those two files, I defined a separate namespace by the targetNamespace attribute:

In fileA.xsd that would be

targetNamespace="http://www.anurlofmine.com/myproject/A"

and in fileB.xsd that would be:

targetNamespace="http://www.anurlofmine.com/myproject/folder/B"

Can I use the path in th eurl to do relative imports ?

Could I for example use

<xs:schema xmlns:relativeA="../A">

in fileB.xsd ?

I’m not really concerned with a way to do it, I know that there are all kinds of ways to specify the location of a schema definition, I’m merely concerned with the meaning of the path in the url.

As far as I know, the url is just a string used to uniquely identify types in xsd files (besides of specifying a place where one might look – no guarantee – for the definition file). Am I correct ?

Hopefully my question is not too weird to be answered 🙂

Thanks a lot in advance
Mischa

  • 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-06-18T08:21:07+00:00Added an answer on June 18, 2026 at 8:21 am

    The schema location hint in the schemaLocation attribute on the import and include elements in XSD schema documents is specified as being of type xs:anyURI, and that means yes, it can be a relative reference.

    So in your fileB.xsd, you can have an import statement of the form

    <xs:import namespace="http://www.anurlofmine.com/myproject/A"
               schemaLocation="../fileA.xsd"/>
    

    The value of a namespace declaration (such as xmlns:relativeA in your example), on the other hand, is expected to be an absolute URI, not a relative URI. Many programs do not actually check namespace names for legality as URIs, so using “../A” as a namespace name won’t necessarily raise an error. But the foundational W3C specs defining the XML technology stack specify that the information set for document which use relative URIs as namespace names is undefined.

    In any case, adding a namespace declaration to an xs:schema element will not have the effect of importing that namespace or referring to any schema document that might be at the location indicated.

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

Sidebar

Related Questions

I have more of a conceptual question. Assume one program running two threads. Both
I have a conceptual question... I am making an Intranet application (Web platform) for
i have a very conceptual question regarding jquery. i have this fiddle http://jsfiddle.net/zvCrN/ What
More of a design/conceptual question. At work the decision was made to have our
This is more of a conceptual question concerning the built in functionality of PHP
I'm new to Prism and have a conceptual question. What I want to build
A conceptual question: I have data stored hierarchically via Core Data SQLite for an
This is a conceptual question involving Hadoop/HDFS. Lets say you have a file containing
This is more of a conceptual question than anything. I have a base class
I have an interesting situation here this time. This more of a conceptual question,

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.