473,396 Members | 1,786 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,396 software developers and data experts.

XML Validation with xsd of a generic node

Hi,

I need to validate an xml which contains a tag called

<Trigger>

that contains a structure which I don't know and that I don't want to
validate.

How should indicate in the XSD file that the document can contain a
tag caller <Trigger> but that I don't want to do any validation of its
contents?

Thanks a lot.
Nov 12 '05 #1
2 1231

The following should do it. Note that it doesn't allow any attributes on
the <Trigger> element.

<xs:element name="Trigger">

<xs:complexType mixed="true">

<xs:sequence>

<xs:any minOccurs="0" maxOccurs="unbounded" namespace="##any"
processContents="skip"/>

</xs:sequence>

</xs:complexType>

</xs:element>
--
Stan Kitsis
Program Manager, XML Technologies
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

"kurotsuke" <ku*******@yahoo.it> wrote in message
news:4c********************************@4ax.com...
Hi,

I need to validate an xml which contains a tag called

<Trigger>

that contains a structure which I don't know and that I don't want to
validate.

How should indicate in the XSD file that the document can contain a
tag caller <Trigger> but that I don't want to do any validation of its
contents?

Thanks a lot.

Nov 12 '05 #2
On Thu, 16 Jun 2005 11:05:36 -0700, "Stan Kitsis [MSFT]"
<sk***@microsoft.com> wrote:

The following should do it. Note that it doesn't allow any attributes on
the <Trigger> element.

<xs:element name="Trigger">

<xs:complexType mixed="true">

<xs:sequence>

<xs:any minOccurs="0" maxOccurs="unbounded" namespace="##any"
processContents="skip"/>

</xs:sequence>

</xs:complexType>

</xs:element>


Worked like a charm. Thank you.
Nov 12 '05 #3

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

Similar topics

21
by: Stefan Richter | last post by:
Hi, after coding for days on stupid form validations - Like: strings (min / max length), numbers(min / max value), money(min / max value), postcodes(min / max value), telefon numbers, email...
0
by: Christian Schuhegger | last post by:
Hello, I am trying to validate a document fragment and I've found the following piece of documentation in the JARV Java API: boolean org.iso_relax.verifier.Verifier.verify(Node node) An...
0
by: alan | last post by:
I want to validate updates to a document made via XUpdate. At this point, I primarily wish to remove the ignorable white space from the updated document as it is updated. I have no experience...
2
by: Wilhelm Pieper | last post by:
Hello, HowTo: create a more generic schema for tree-style objects. (Generic in the sense of unknown depth). eg: <root> <node> <node> .. <leaf>..</leaf> .. </node>
18
by: Vlad | last post by:
I have the following code: I have a local copy of the DTD that I need to validate incoming XML documents against. The XML document has the <!DOCTYPE myname SYSTEM "myfile.dtd"> define. When the...
15
by: Stig Brautaset | last post by:
Hi group, I'm playing with a little generic linked list/stack library, and have a little problem with the interface of the pop() function. If I used a struct like this it would be simple: ...
5
by: Richard Brown | last post by:
Ok, I've been looking through the .NET SDK docs and stuff. I'm wondering if you can provide a control extender that does generic validation or functionality just by dropping it on the form. For...
0
by: Matt | last post by:
I have a problem when I select node elements from an xml file and validata each node againts the schema. I use XmlValidatingReader and it complains about elements not being declared. I have...
9
by: julie.siebel | last post by:
Hello all! As embarrassing as it is to admit this, I've been designing db driven websites using javascript and vbscript for about 6-7 years now, and I am *horrible* at form validation. To be...
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: 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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.