allow any child element in
- From: "Jeremy Chapman" <me@xxxxxxxx>
- Date: Tue, 1 Nov 2005 16:39:31 -0800
I want to create an xsd so that I can validate xml against it. All I care
is that the root node (named brl) exists in the document. Any other node
can go inside it. If I validate an xml file with just the brl node it
validates fine, but if I put other elements in I get errors. How can I
change the xsd so that any child elements/attributes of brl validate ok,
without having to explicitly declare them in the xsd? (I've included my
xml, xsd and the errors below)
XSD:
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
targetNamespace="http://schemas.microsoft.com/businessruleslanguage/2002"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="brl" type="xs:anyType">
<xs:annotation>
<xs:documentation>Business Rules Engine Deployment
File</xs:documentation>
</xs:annotation>
</xs:element>
</xs:schema>
XML:
<?xml version="1.0" encoding="utf-8"?>
<brl xmlns="http://schemas.microsoft.com/businessruleslanguage/2002">
<ruleset name="InteriorHealth.Orchestrations.InterRaiADT.RouteFilter">
<version major="1" minor="0" description="" modifiedby="IHA\chaj17"
date="2005-09-26T16:40:45.6215718-07:00" />
</ruleset>
</brl>
Errors:
The 'http://schemas.microsoft.com/businessruleslanguage/2002:ruleset'
element is not declared. An error occurred at , (3, 4).
Could not find schema information for the attribute 'name'. An error
occurred at , (3, 12).
The 'http://schemas.microsoft.com/businessruleslanguage/2002:version'
element is not declared. An error occurred at , (4, 6).
Could not find schema information for the attribute 'major'. An error
occurred at , (4, 14).
Could not find schema information for the attribute 'minor'. An error
occurred at , (4, 24).
Could not find schema information for the attribute 'description'. An error
occurred at , (4, 34).
Could not find schema information for the attribute 'modifiedby'. An error
occurred at , (4, 49).
Could not find schema information for the attribute 'date'. An error
occurred at , (4, 73).
.
- Follow-Ups:
- Re: allow any child element in
- From: Pascal Schmitt
- Re: allow any child element in
- Prev by Date: Re: Calls to GetElementsByTagName affect performance of XML DOM
- Next by Date: Re: allow any child element in
- Previous by thread: Getting around .Net Strings being UTF-16 encoded only
- Next by thread: Re: allow any child element in
- Index(es):
Relevant Pages
|