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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:35:46+00:00 2026-06-15T11:35:46+00:00

Here’s an XML sample: <Search ID=Blah input=Some search line1=first line of result line2=second line

  • 0

Here’s an XML sample:

<Search ID="Blah"
        input="Some search"
        line1="first line of result"
        line2="second line of result"
        line3="third line of result"
        />

The attributes named line1 to line3 are optional and unbound – a given search element could have line attributes all the way up to line99 or something (realistically never higher than 2 digits). Is there any way of specifying a pattern of acceptable attribute names in an XML Schema so that I could validate this, without manually specifying all optional attribute names up to whatever I actually use?

Ideally I would like something along the lines of:

<xs:attribute name="line[0-9][0-9]" type="xs:string" use="optional" />

in the schema definition.

I suspect this is not possible, but all of the searches I do to try and find out for sure end up finding ways of using patterns on the actual values of the attributes, not their names, so if someone could please confirm whether this is possible or not, that would be great.

  • 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-15T11:35:48+00:00Added an answer on June 15, 2026 at 11:35 am

    No, that is not possible. If you read the XML specification on attribute declarations, you’ll notice that attribute names are of type NCName, which excludes the [and ]characters.

    On another note, it is a very strange use of attributes to convey the result of a query. A much more natural format would be

    <search id="..." input="...">
        <result>
           <line nr="1">bla bla</line>
           <line nr="2">more bla bla</line>
           ...
           <line nr="99">extra bla</line>
        </result>
    </search>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is a XML: <mesh> <triangles material=face count=990> <input semantic=VERTEX source=#boyShape-skin-vertices offset=0/> <input semantic=NORMAL
Here is a scenario: User installs .NET application that you have made. After some
Here's a sample of a SpinBox that writes its changes to underlying variables. The
Here is my persistence.xml : <?xml version=1.0 encoding=UTF-8?> <persistence xmlns=http://java.sun.com/xml/ns/persistence xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd version=1.0>
Here is my HTML. Just a simple form: <form> Username: <input type=text id=username/> <br/>
Here are some facts about my app followed by a question My app has
Here is my problem.. I have the option to create(add) two new input fields,
Here's the code I have. It works. The only problem is that the first
Here's the two scenarios. We are using a manually built xml soap request with
Here's the view: @if (stream.StreamSourceId == 1) { <img class=source src=@Url.Content(~/Public/assets/images/own3dlogo.png) alt= /> }

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.