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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:27:24+00:00 2026-05-13T22:27:24+00:00

I have a project where a xsd document is loaded, and based on that

  • 0

I have a project where a xsd document is loaded, and based on that a editor is created for each element. And then xml that implements that schema is loaded into the editor. This could be a simple textbox for a string, a datepicker for a date or a more complex data like a chapter with associated metadata.
The editor is generic so the editor has be generated based on the schema. For simple types ( like string and date) we can use the type attribute. But for more complex custom types we need to add a attribute to the xsd document that defines what editor subelement to use.

So I added a custom attribute called UIType, but this is not allowed by the w3 schema schema. Is there any way I can extend the w3 schema schema, prefably without making a copy of it and adding what I need, but actually extend it? Or is there another smarter way of doing this?

Thanks.

Just to make it clear; I do not want to add the attribute to the actual xml data, but to the schema.

Here is an example of the schema:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified">
    <xs:element name="PublishDate" type="xs:date" />
    <xs:element name="Chapters">
        <xs:complexType>
            <xs:sequence>
                <xs:element maxOccurs="unbounded" name="Chapter" UIType="ChapterPicker" >
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="ID" type="xs:int" />
                            <xs:element name="FileID" type="xs:int" />
                            <xs:element name="Title" type="xs:string" />
                            <xs:element name="Artist" type="xs:string" />
                            <xs:element name="Year" type="xs:int" />
                            <xs:element name="Timestamp" type="xs:string"  />
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>
  • 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-13T22:27:25+00:00Added an answer on May 13, 2026 at 10:27 pm

    You already seem to be creating your extended types. You aren’t limited to using “xs:int” or “xs:string” as the type. You can define your own types by extracting the complexType elements and naming them. You can then use their name as a type for other elements.

    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified">
        <xs:element name="PublishDate" type="xs:date" />
        <xs:element name="Chapters" type="Chapters_t" />
        <xs:complexType name="Chapters_t">
            <xs:sequence>
                <xs:element maxOccurs="unbounded" name="Chapter" UIType="ChapterPicker" >
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="ID" type="xs:int" />
                            <xs:element name="FileID" type="xs:int" />
                            <xs:element name="Title" type="xs:string" />
                            <xs:element name="Artist" type="xs:string" />
                            <xs:element name="Year" type="xs:int" />
                            <xs:element name="Timestamp" type="xs:string"  />
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:schema>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 428k
  • Answers 428k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer the "S" is for secure! I finally figured out that… May 15, 2026 at 1:08 pm
  • Editorial Team
    Editorial Team added an answer What equivalent data-type should i be using in Java to… May 15, 2026 at 1:08 pm
  • Editorial Team
    Editorial Team added an answer You get a NullPointerException when you try to call a… May 15, 2026 at 1:08 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.