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

  • SEARCH
  • Home
  • 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 7680023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:00:51+00:00 2026-05-31T18:00:51+00:00

I have an XML (first.xml) which looks like :: <?xml version=1.0 encoding=utf-8?> <saw:jobInfo xmlns:saw=com.analytics.web/report/v1.1>

  • 0

I have an XML (first.xml) which looks like ::

 <?xml version="1.0" encoding="utf-8"?>
 <saw:jobInfo xmlns:saw="com.analytics.web/report/v1.1">     
      <saw:jobStats>...........</saw:jobStats>    
       <saw:detailedInfo> .....</saw:detailedInfo>    
       <saw:fileInfo>..........</saw:fileInfo>
 </saw:jobInfo> 

The below XML (second.xml) is same as the above but with a different namespace.

<?xml version="1.0" encoding="utf-8"?> 
 <soap:jobInfo xmlns:soap="urn://bi.webservices/v6">  
   <soap:jobStats>...........</saw:jobStats>
   <soap:detailedInfo> .....</saw:detailedInfo>    
   <soap:fileInfo>..........</saw:fileInfo>
 </soap:jobInfo> 

As I have the same element and attribute names in both the xml’s I am using the same xsd file to validate both.

XSD file ::

 <?xml version="1.0" encoding="utf-8" ?>  
 <xs:schema targetNamespace="com.analytics.web/report/v1.1"      
  xmlns="com.analytics.web/report/v1.1" 
  xmlns:saw="com.analytics.web/report/v1.1" 
  xmlns:soap="urn://bi.webservices/v6"
  xmlns:xs="http://www.w3.org/2001/XMLSchema" 
  elementFormDefault="qualified"
  attributeFormDefault="unqualified"> 

After including xmlns:soap=”urn://bi.webservices/v6&#8243; the schema validation failed for second.xml saying unkown element “soap:jobinfo”. I poked around and found the targetNamespace value should be same as the namespace URI.
Please let me know how to use the same XSD for two different namespaces having different URIs.

  • 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-31T18:00:52+00:00Added an answer on May 31, 2026 at 6:00 pm

    Short answer is you can’t. You could, however, if you would be using three XSDs. It would allow you to have all the XSD that matters into one file (Chameleon.XSD), and have two more that simply compose Chameleon.XSD, those two having the namespaces you want.

    Chameleon.XSD

    <?xml version="1.0" encoding="utf-8"?>
    <!--W3C Schema generated by QTAssistant/W3C Schema Refactoring Module (http://www.paschidev.com)-->
    <xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <xsd:element name="jobInfo">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element name="jobStats" type="xsd:string" />
            <xsd:element name="detailedInfo" type="xsd:string" />
            <xsd:element name="fileInfo" type="xsd:string" />
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    </xsd:schema>
    

    JobInfo1.xsd

    <?xml version="1.0" encoding="utf-8"?>
    <!--W3C Schema generated by QTAssistant/W3C Schema Refactoring Module (http://www.paschidev.com)-->
    <xsd:schema xmlns="com.analytics.web/report/v1.1" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="com.analytics.web/report/v1.1" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <xsd:include schemaLocation="Chameleon.xsd"/>
    </xsd:schema>
    

    JobInfo2.xsd

    <?xml version="1.0" encoding="utf-8"?>
    <!--W3C Schema generated by QTAssistant/W3C Schema Refactoring Module (http://www.paschidev.com)-->
    <xsd:schema xmlns="urn://bi.webservices/v6" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="urn://bi.webservices/v6" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <xsd:include schemaLocation="Chameleon.xsd"/>
    </xsd:schema>
    

    Relationships:

    Chameleon relationships

    If you want one XSD to validate them all, then you can go and build a fourth one, that imports these two.

    OneAll.XSD

    <?xml version="1.0" encoding="utf-8"?>
    <!--XML Schema generated by QTAssistant/XSD Module (http://www.paschidev.com)-->
    <xsd:schema xmlns="urn:tempuri-org:XSD:1" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="urn:tempuri-org:XSD:1" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <xsd:import namespace="com.analytics.web/report/v1.1" schemaLocation="JobInfo1.xsd"/>
        <xsd:import namespace="urn://bi.webservices/v6" schemaLocation="JobInfo2.xsd"/> 
    </xsd:schema>
    

    Updated relationships:

    One all

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

Sidebar

Related Questions

I have main page that looks like this: <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html
I have XML that looks something like this: <Root xmlns=http://widgetspecA.com/ns> ...any... <WidgetBox> <A/> <B/>
I have XML that looks like this: <Parameter Name=parameter name Value=parameter value /> which
I have an XElement, called XUsers, that will contain XML which looks like this:
I have a xml doxument that looks like this: <create> <customers> <customer> <first-name>foo</first-name> <last-name>bar</last-name>
So say I have this XML file: <?xml version=1.0 encoding=utf-8 standalone=yes?> <Root> <Category Name=Tasties>
Suppose I have two XML files. First XML File: <?xml version=1.0?> <AccessRequest xml:lang=en-US> <AccessLicenseNumber>Your_License</AccessLicenseNumber>
I have XML that looks like this: <ROW ref=0005631 type=04 line=1 value=Australia/> <ROW ref=0005631
I am calling a REST webservice. The response looks something like this: <?xml version=\1.0\
...well, actually I have an object which looks like this: object(AleParserXMLElement)#39 (4) { [name:private]=>

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.