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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:19:53+00:00 2026-05-13T09:19:53+00:00

I am using Apache Xerces 3.0.1 XInclude. I want to use the xinclude mechanism

  • 0

I am using Apache Xerces 3.0.1 XInclude. I want to use the xinclude mechanism to include XML files. I have three XML files all in the same directory. test_a.xml xincludes test_b.xml which xincludes test_c.xml. When I just have test_a.xml xinclude test_b.xml, it works. However, when I have test_b.xml xinclude test_c.xml I get the following command line error:

C:\digital_receiver\test>XInclude.exe test_a.xml test_z.xml
Parse test_a.xml in progress …
Fatal Error at file C:\digital_receiver\test/test_a.xml, line 3, char 34
Message: no scheme found in URI
finished.

test_a.xml:

<?xml version="1.0" encoding="ISO-8859-1"?>
<test_a xmlns:xi="http://www.w3.org/2001/XInclude">
  <xi:include href="test_b.xml"/>
</test_a>

test_b.xml:

<?xml version="1.0" encoding="ISO-8859-1"?>
<test_b xmlns:xi="http://www.w3.org/2001/XInclude">
  <ch>5</ch>
  <xi:include href="test_c.xml"/>
</test_b>

test_c:xml:

<?xml version="1.0" encoding="ISO-8859-1"?>
<test_c>
  <channel>1</channel>
</test_c>

Any help would be appreciated.

  • 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-13T09:19:54+00:00Added an answer on May 13, 2026 at 9:19 am

    As far as I can tell, your XML is OK, but I wouldn’t claim to be the last word on this.

    It’s my guess that you’re hitting a bug in Xerces’ XInclude processing. I note that while this code is almost three years old, it apparently wasn’t released until Xerces 3.0, so it may be relatively untested. (And given the way that base URIs of included documents are handled in XInclude, the possibility of a bug here seems like it’s greater than 0.)

    As a workaround, I’d suggest doing what the error message suggests: add a scheme to the URIs for the included files. Unfortunately, for file URIs, that also means you need to use an absolute URI.

    test_a.xml:

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <test_a xmlns:xi="http://www.w3.org/2001/XInclude">
      <xi:include href="file://path/to/directory/test_b.xml"/>
    </test_a>
    

    test_b.xml:

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <test_b xmlns:xi="http://www.w3.org/2001/XInclude">
      <ch>5</ch>
      <xi:include href="file://path/to/directory/test_c.xml"/>
    </test_b>
    

    UPDATE: There is indeed a similar bug at apache.org. (I think it’s describing the same issue, but the wording on the report makes it sound like even a single layer of inclusion would fail when using relative paths.)

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

Sidebar

Related Questions

I am using Java 6 and want to process (read and write) xml files
How to remove XML nodes in Java SE? I am using org.apache.xerces . Thanks.
I'm using JDOM with SAXBuilder to parse XML files, and I have a problem
Using Apache Wicket 1.4: I have a panel that calls some setup Javascript in
I am using apache ant to generate javadoc for my project. I have a
I'm using Apache Commons Logging and SLF4J with log4j, but I also want to
Using Apache Felix, I have an OSGi component I've authored that wraps some middleware
I have an application doing XML<->conversions using Jaxb and automatically generated classes with maven-jaxb2-plugin.
When using Apache XML Beans to generate types from xsd:enumeration types, XMLBeans generates custom
I'm using Apache Derby 10.8 if it makes a difference. I have a very

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.