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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:22:26+00:00 2026-06-14T12:22:26+00:00

We are using schemagen to create an XSD from some annotated POJOs. Here is

  • 0

We are using schemagen to create an XSD from some annotated POJOs.

Here is our ant target

<target name="generate-xsd" depends="compile">
    <taskdef name="schemagen" classname="com.sun.tools.jxc.SchemaGenTask" 
                     classpathref="xjc.classpath"/>
    <schemagen srcdir="src" destdir="generated" includeantruntime="false">
        <include name="com/acme/exam/delivery/records/**"/>
        <schema namespace="http://www.acme.com/deliverylog" 
                            file="deliverylog.xsd"/>
        <schema namespace="" file="supplemental.xsd"/> 
    </schemagen>
</target>

This is generating

<xs:schema elementFormDefault="qualified" version="1.0" 
           targetNamespace="http://www.acme.com/deliverylog" 
           xmlns:tns="http://www.acme.com/deliverylog" 
           xmlns:xs="http://www.w3.org/2001/XMLSchema">

Where does the tns namespace come from and what does it signify?

  • 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-14T12:22:27+00:00Added an answer on June 14, 2026 at 12:22 pm

    That infomration comes from the package level annotation @XmlSchema which can be found in the package-info class. See below for an example.

    package-info

    @XmlSchema(
        namespace = "http://www.acme.com/deliverylo",
        elementFormDefault = XmlNsForm.QUALIFIED)
    package example;
    
    import javax.xml.bind.annotation.XmlNsForm;
    import javax.xml.bind.annotation.XmlSchema;
    

    Sample XML

    elementFormDefault specifies which elements should be namespace qualified (true = all, false = only global elements), and targetNamespace defines what the namespace is.

    <foo xmlns="http://www.acme.com/deliverylog">
        <bar>Hello World</bar>
    </foo>
    

    For More Information

    • http://blog.bdoughan.com/2010/08/jaxb-namespaces.html
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How to create a JAXB java class out of a xml schema using a
Using mercurial, I've run into an odd problem where a line from one committer
Using Jenkins or Hudson I would like to create a pipeline of builds with
Using Java,I have to fetch multiple sets of values from an XML file to
Using Yii, I want to delete all the rows that are not from today.
Using CMake I want to check if a particular function (cv::getGaborKernel) from OpenCV library
Using CSS, how can I create a partial border as per image below I
I use Hibernate to generate my database automatically for testing, and I have some
We have some XSDs in our project that define types that use attributes, as
Using C# .NET 3.5 and WCF, I'm trying to write out some of the

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.