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

Validating an XForms document

I have been having problems validating an XForms document against the
XForms schema located at
http://www.w3.org/MarkUp/Forms/2002/XForms-Schema.xsd.

I have reduced the XForm to its bare bones as follows:

<?xml version="1.0" encoding="iso-8859-1"?>
<xf:model xmlns:xf="http://www.w3.org/2002/xforms">
<xf:instance xmlns=""/>
</xf:model>

However, it still does not validate according to any of:

1) http://www.gotdotnet.com/services/xsdvalidator/
2) http://tools.decisionsoft.com/schemaValidate.html
3) msxml 4.0 sp2

I get errors relating to "model" and "instance" not being declared in
the schema.

Can anyone shed any light on this.

Regards

WH
Jul 20 '05 #1
2 3582


Will wrote:
I have been having problems validating an XForms document against the
XForms schema located at
http://www.w3.org/MarkUp/Forms/2002/XForms-Schema.xsd.

I have reduced the XForm to its bare bones as follows:

<?xml version="1.0" encoding="iso-8859-1"?>
<xf:model xmlns:xf="http://www.w3.org/2002/xforms">
<xf:instance xmlns=""/>
</xf:model>

However, it still does not validate according to any of:

1) http://www.gotdotnet.com/services/xsdvalidator/
2) http://tools.decisionsoft.com/schemaValidate.html
3) msxml 4.0 sp2


I have tried validating your simple document against the schema you have
listed above with MSXML 4 with the following JScript program

var schemaCache = new ActiveXObject('Msxml2.XMLSchemaCache.4.0');
schemaCache.add('http://www.w3.org/2002/xforms',
'http://www.w3.org/MarkUp/Forms/2002/XForms-Schema.xsd');

var xmlDocument = new ActiveXObject('Msxml2.DOMDocument.4.0');
xmlDocument.async = false;
xmlDocument.schemas = schemaCache;

var loaded = xmlDocument.load('test2004081204.xml');
if (!loaded) {
alert(xmlDocument.parseError.reason + '\r\n' +
xmlDocument.parseError.line + '\r\n' +
xmlDocument.parseError.srcText);
}
else {
alert("valid");
}

and I already get an error when the schema is processed, the error
happens when the included schema for XML schema
http://www.w3.org/2001/XMLSchema.xsd
is processed so it doesn't look like MSXML 4 is able to help you with
validation here.
--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2


Will wrote:
I have been having problems validating an XForms document against the
XForms schema located at
http://www.w3.org/MarkUp/Forms/2002/XForms-Schema.xsd.

I have reduced the XForm to its bare bones as follows:

<?xml version="1.0" encoding="iso-8859-1"?>
<xf:model xmlns:xf="http://www.w3.org/2002/xforms">
<xf:instance xmlns=""/>
</xf:model>

However, it still does not validate according to any of:

1) http://www.gotdotnet.com/services/xsdvalidator/
2) http://tools.decisionsoft.com/schemaValidate.html
3) msxml 4.0 sp2

I get errors relating to "model" and "instance" not being declared in
the schema.

Can anyone shed any light on this.


Trying jEdit on your file by adding the schemaLocation attribute e.g.

<?xml version="1.0" encoding="iso-8859-1"?>
<xf:model
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2002/xforms
http://www.w3.org/MarkUp/Forms/2002/XForms-Schema.xsd">
<xf:instance xmlns=""/>
</xf:model>

I do not get any validation errors, jEdit uses Xerces-J from
http://xml.apache.org/.
--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #3

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

Similar topics

1
by: Jonathan | last post by:
Does anyone know if it's possible to do the following: I currently have an XML schema set up, part of which includes an enumerated datatype (based on string) giving a list of values that I want...
0
by: Victor Engmark | last post by:
I am quite new to XForms, but I need to do a feasibility study to see whether a system I'm supposed to make can be done without any scripting or programming language (to make it simple and not need...
0
by: inquirydog | last post by:
Hello- XML clearly allows recursive xml (ie- elements to appear in themselves- examples are in mathml- functions of functions of functions, or xhtml, tables in tables in tables). My question is...
0
by: arti | last post by:
Hi all. I have a problem/question with XForms. I have 2 instnace in my document, instance1 and instance2. <xforms:instance xmlns="" id=instance1"> .... </xforms:instance> <xforms:instance...
0
by: Brian | last post by:
However can ask the following questions (or provide a solution) will be dubbed hero of the year: Is it possible to generate an XForms document automatically from an XML Schema document, so that...
9
by: jazzslider | last post by:
I have a headache. I've done a LOT of research lately into XForms, and I am thoroughly convinced that a good implementation of this technology would help me immensely in converting my...
1
by: spark86 | last post by:
I currently have an xform where I'm trying to have the user input first and last name and then when it submits it goes to a file with the path first_last.xml. Here is what I have currently: ...
2
by: li72 | last post by:
Hi. I’m new to XForms society and struggling with a basic concepts. However, I’m trying to transform an xml doc into XForms using XSLT. The browser renders the Xforms just fine but there is no...
0
by: li72 | last post by:
As you can see in binding part, the node<age /> should be returned as a calendar or any form of date picker instead of an input box. In addition, none null values submission is not achieving. I...
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: 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
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...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.