473,378 Members | 1,444 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

XML Schema spec: Attribute Wildcard Intersection

Hello,

The following rule in the XML Schema spec, section "Schema Component
Constraint: Attribute Wildcard Intersection" seems strange to me:

=======================================
3 If either O1 or O2 is a pair of not and a value (a namespace name or
·absent·) and the other is a set of (namespace names or ·absent·), then
that set, minus the negated value if it was in the set, minus ·absent· if
it was in the set, must be the value.
=======================================
I don't understand the rationale behind "minus ·absent· if it was in the
set". This means that ·absent· is removed whenever it appears in the set.
It would be natural to remove it iff the second component of the "not"
pair is ·absent·.

Can someone explain the rationale behind the spec ?

-- Alain Frisch
Jul 20 '05 #1
3 1789
In article <d5***********@nef.ens.fr>,
Alain Frisch <fr****@clipper.ens.fr> wrote:
3 If either O1 or O2 is a pair of not and a value (a namespace name or
·absent·) and the other is a set of (namespace names or ·absent·), then
that set, minus the negated value if it was in the set, minus ·absent· if
it was in the set, must be the value. I don't understand the rationale behind "minus ·absent· if it was in the
set". This means that ·absent· is removed whenever it appears in the set.
It would be natural to remove it iff the second component of the "not"
pair is ·absent·. Can someone explain the rationale behind the spec ?


The case described is the intersection of ##other and and set of
namespaces. In this context, "absent" means "no-namespace".

When the target namespace is absent, ##other means any non-absent
namespace. When the target namespace is not absent, ##other means any
*non-absent* namespace other than the target namespace. I think the
idea behind this is that ##other is intended to allow extensibility by
having attributes from other namespaces, not by having attributes in
no namespace.

So in the latter case, the intersection should exclude both the target
namespace and absent.

Now for some reason that is not clear to me[*], the namespace
constraint ##other is not represented as a pair of "not" and (a set of
the target namespace and absent), but merely as a pair of "not" and
the target namespace. So to make the intersection give the right
answer, the spec has to give the peculiar definition quoted.
Similarly, it has to give a peculiar definition for "Wildcard allows
Namespace Name" a few paragraphs earlier.
[*] It's probably one of those "historical" reasons.

-- Richard
Jul 20 '05 #2
Richard Tobin, dans le message (comp.text.xml:68011), a écrit :
When the target namespace is absent, ##other means any non-absent
namespace. When the target namespace is not absent, ##other means any
*non-absent* namespace other than the target namespace.


Many thanks, I missed that. It makes perfect sense, now. I was also
wondering about rule 6, but it is now clear as well.

I have another question. Rule 5 is:

=============================================
If the two are negations of different namespace names, then the
intersection is not expressible.
=============================================

Can this actually happen in a valid XML Schema document? Does the spec
make it impossible with another condition somewhere else? Otherwise, how
is the processor supposed to handle this case?
-- Alain
Jul 20 '05 #3
In article <d5***********@nef.ens.fr>,
Alain Frisch <fr****@clipper.ens.fr> wrote:
I have another question. Rule 5 is:

=============================================
If the two are negations of different namespace names, then the
intersection is not expressible.
=============================================

Can this actually happen in a valid XML Schema document? Does the spec
make it impossible with another condition somewhere else? Otherwise, how
is the processor supposed to handle this case?


It can happen, if you restrict one ##other wildcard with another
(obviously you must have imported a schema for another namespace to be
able to do this).

I think the processor is supposed to handle it by saying "you can't do
that".

-- Richard

Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Honza Pazdziora | last post by:
Hello, I'm processing documents that can have any element names in them. The only restriction is placed on the attributes of these elements, each of them can only have two attributes of given...
2
by: Victor Engmark | last post by:
I am making an XML Schema for emails, and would like to specify that any elements from the XHTML2 namespace are allowed in the body/contents and signature/footer parts of the message (and _only_...
2
by: wooks | last post by:
I apologise if this has been asked before, it is a bit hard to search for. I have an xml schema which defines the elements in the namespace "urn:dummy". The schema does not contain any...
2
by: Stanimir Stamenkov | last post by:
I'm trying to find out if it is permissible to include a schema document with absent target namespace to a schema with specified target namespace, and if it is, what are the rules to resolve the...
1
by: Porthos | last post by:
Hello all, Is there a facet pattern that will allow for the inclusion of a newline or carriage return to occur within a tag? From the W3C schema document and from previous posts I've read that ...
4
by: Iain A. Mcleod | last post by:
Hi I'm stuck with the following schema validation problem in VS.NET 2003: I have two types of xml document and related schema: project and projectCollection. A projectcollection is just a set...
2
by: Shailendra Batham | last post by:
Hello Gurus, I want to put some restrictions on my attribute tag in my XML Schema, anyone out there have any idea how to do that. here is my XML and the XML Schema <?xml version="1.0"...
78
by: wkehowski | last post by:
The python code below generates a cartesian product subject to any logical combination of wildcard exclusions. For example, suppose I want to generate a cartesian product S^n, n>=3, of that...
1
by: mahesh.kanakaraj | last post by:
Hi All, I have a confusion in finding the 'effective content' of a complex type definition in a XML Schema. I shall give you an example situation to clearly explain my problem. Let's have...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.