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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T17:00:36+00:00 2026-05-19T17:00:36+00:00

I have list of mapping XML documents which is basically translations from one language

  • 0

I have list of mapping XML documents which is basically translations from one language to other. This is a sample:

<?xml version="1.0" encoding="UTF-8"?>
<root lang="en,fr">
    <item name="error_1">
        <en><![CDATA[User name does not exist.]]></en>
        <fr><![CDATA[Nom d'utilisateur n'existe pas.]]></fr>
    </item>
    <item name="error_2">
        <en><![CDATA[One or both path parameters have not defined.]]></en>
        <fr><![CDATA[Un ou deux paramètres de trajet ne sont pas définies.]]></fr>
    </item>
</root>

I need to write XSD on this type of files if it is possible.
As I see here is some type of complicity with elements because language elements is dynamic type base on attribute lang of the root element.
Language value is base on ISO 639-1 standard, separated by comma and could be one or more. In this case each item set must have the same element included. Default lang attribute has single value “en” and element item only one sub-element en. It is looks like that:

<?xml version="1.0" encoding="UTF-8"?>
<root lang="en">
    <item name="error_1">
        <en><![CDATA[User name does not exist.]]></en>
    </item>
    <item name="error_2">
        <en><![CDATA[One or both path parameters have not defined.]]></en>
    </item>
</root>

I need some solution, advice. Is this task achievable?

  • 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-19T17:00:36+00:00Added an answer on May 19, 2026 at 5:00 pm

    W3C schema doesn’t allow you to express those sort of conditional constraints.

    Schematron is an ISO standard that was designed for this sort of validation.

    As an aside, if you made the @lang NMTOKENS other systems reading the schema would know how to handle it. Comma separated values requires additional custom parsing logic to understand that there are multiple values in that attribute value.

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

Sidebar

Related Questions

I have an xml mapping file that looks something like this <colourMappings> <model name=modelX>
I have list of structure. I want to modify a particular data from the
I have List I want to sort Desc by Priority, which is int and
I have list of files which contain particular patterns, but those files have been
I recently added new property in one class, its list property and I have
i have a very specific problem with the mapping of an xml file to
I have an XML file with the following format: <?xml version=1.0 encoding=UTF-8?> <Items> <Item
I am new to spring security I have web.xml <?xml version=1.0 encoding=UTF-8?> <web-app xmlns=http://java.sun.com/xml/ns/javaee
I have a spring project which uses different libraries, packed as multiple jars. One
I have this simple class: public class MappingCollection<T> : List<T> { private int _declaredTotal

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.