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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:59:50+00:00 2026-05-28T02:59:50+00:00

So I parsed a bunch of XMLs to generate a giant schema file using

  • 0

So I parsed a bunch of XMLs to generate a giant schema file using trang which went fine. However, when I try to generate sources using xjc, I get the following error,

xjc reutersXMLSchema.xsd 
parsing a schema...
[ERROR] no-xsi: The {target namespace} of an attribute declaration must not match       'http://www.w3.org/2001/XMLSchema-instance'.
line 11 of file:/Users/cqin/Downloads/trang-20081028/xsi.xsd

Failed to parse a schema.

The schema looks like the following,

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"   targetNamespace="http://www.w3.org/2001/XMLSchema-instance"      xmlns:filter="http://schemas.reuters.com/ns/2006/04/14/rmds/webservices/news/filter"   xmlns:ns0="http://www.reuters.com/ns/2006/05/01/webservices/rkd/News_1"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xmlns:s="http://www.w3.org/2003/05/soap-envelope"  xmlns:ns1="http://schemas.reuters.com/ns/2006/04/14/rmds/webservices/news/headlineml"  xmlns:cache_1="http://www.reuters.com/ns/2008/03/01/webservices/rkd/Cache_1"  xmlns:ns2="http://www.reuters.com/ns/2006/05/01/webservices/rkd/TokenManagement_1" xmlns:global="http://www.reuters.com/ns/2006/05/01/webservices/rkd/Common_1"  xmlns:a="http://www.w3.org/2005/08/addressing">
<xs:import   namespace="http://schemas.reuters.com/ns/2006/04/14/rmds/webservices/news/filter"   schemaLocation="filter.xsd"/>
<xs:import namespace="http://schemas.reuters.com/ns/2006/04/14/rmds/webservices/news/headlineml" schemaLocation="ns1.xsd"/>
<xs:import namespace="http://www.reuters.com/ns/2006/05/01/webservices/rkd/Common_1" schemaLocation="global.xsd"/>
<xs:import namespace="http://www.reuters.com/ns/2006/05/01/webservices/rkd/News_1" schemaLocation="reutersXMLSchema.xsd"/>
<xs:import namespace="http://www.reuters.com/ns/2006/05/01/webservices/rkd/TokenManagement_1" schemaLocation="ns2.xsd"/>
<xs:import namespace="http://www.reuters.com/ns/2008/03/01/webservices/rkd/Cache_1" schemaLocation="cache_1.xsd"/>
<xs:import namespace="http://www.w3.org/2003/05/soap-envelope" schemaLocation="s.xsd"/>
<xs:import namespace="http://www.w3.org/2005/08/addressing" schemaLocation="a.xsd"/>
<xs:attribute name="type" type="xs:NCName"/>
</xs:schema>

Any idea why it won’t work?

I’ve tried changing the targetNameSpace to something unique but I get more errors so I’m wondering if there is something I can do with the original error.

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-28T02:59:51+00:00Added an answer on May 28, 2026 at 2:59 am

    Yes, this isn’t right:

    targetNamespace="http://www.w3.org/2001/XMLSchema-instance"
    

    This is saying that the target namespace of your schema is actually the namespace of the Schema definition schema itself (i.e. the schema which defines the things like <xs:schema> and <xs:import> actually mean). This schema is fixed, you can’t write your own schema targeting it, which is why XJC is rejecting it.

    I’ve tried changing the targetNameSpace to something unique but I get more errors

    Keep trying that, you’ll get further than with what you have now. However, the fact that trang is generating this bad schema at all is suggestive that you’ve done something wrong further back along the line. Perhaps you asked it to generate a combined schema which included the http://www.w3.org/2001/XMLSchema-instance schema itself, which is almost certainly not what you want to do.

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

Sidebar

Related Questions

I have parsed XML file into objects, in which each object has a 1:1
I have a bunch of XML Files which I have parsed into discrete fields.I
I'm trying to parse through a bunch of PHP code using ack . I'm
I have parsed a file in tcl and i read the line like that
I have a bunch of files that need to be parsed, and they all
I am trying to parse a bunch of XML files. I am using Nokogiri,
I'm trying to parse a bunch of webpages from an adult website using Ruby:
I've got a batch file that parses a bunch of file names out of
I am trying to pull elements out of a parsed XML file by searching
I'm working on a pagination sort of thing, which is simply just a bunch

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.