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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:18:36+00:00 2026-06-18T04:18:36+00:00

I am creating an XSD/CAM prototype to model a disk filesystem. I am using

  • 0

I am creating an XSD/CAM prototype to model a disk filesystem. I am using the free CAMed software along with Windows Notepad (for when I run into bugs in the CAMed software.) In my prototype I have an element called “Hold.” A Hold tells the filesystem to hold on to (not delete) a directory, file, etc. because it is needed by an application. (Think of a Hold as somewhat like a hard link.) In the prototype, the Hold element can be a child of several elements, not just one, but is identical in all cases. Ordinarily, I would simply copy and paste the Hold element inside each parent it belongs under (e.g. directory, file, etc.,) however, the CAMed software doesn’t have that capability and I don’t feel like manually copying and pasting the XML in notepad (I would then have many copies to update and manage.)

Is it possible to specify that an element can belong to more than one parent, without duplicating the original element definition? 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-06-18T04:18:37+00:00Added an answer on June 18, 2026 at 4:18 am

    Sure. Define a top-level element named Hold. (By ‘top-level’ is meant that the declaration appears as a child of xs:schema and is not local to a particular complex type.) Then refer to that element declaration from the complex types in which Hold should appear.

    So your declaration of Hold will look like this:

    <xs:element name="Hold" type="HoldType"/>
    <!--* HoldType left as exercise for the reader ... *-->
    

    And your declarations of the types for directory, file, etc. will refer to Hold, using the ref attribute on the xs:element element, rather than declaring a local Hold element using the name attribute:

    <xs:type name="DirectoryType">
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="blort" type="xs:gYear"/>
        <xs:element name="farble" type="Farble"/>
        <xs:element ref="cadwallader"/>
        <xs:element ref="Hold"/>
      </xs:choice>
    <xs:complexType>
    

    Here, the elements ‘blort’ and ‘farble’ are local declarations, while ‘Hold’ and ‘cadwallader’ are references to top-level declarations supplied elsewhere.

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

Sidebar

Related Questions

I am creating an XML file in C# using a XSD Schema of an
I'm having trouble creating an XML file from XSD using JAXB below is the
I'm regularly creating an XSD schema by transforming a proprietary data model of a
I am using JAXB to create Java objects from XSD file. I am creating
I have a library I am creating based on some WSDL/XSD definitions. I am
Creating a simple RPG game, first time using XNA. Trying to get my character
I stuck into creating an XSD schema allowing only next sequence of elements: <root>
i'm creating a very simple (hello World quality) web application using spring mvc 3.0.
I'm creating an XML file based on someone else's XSD specification, but I just
I'm creating an xml file and have an XSD file to work against. I'm

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.