473,750 Members | 2,308 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3623


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.XMLSchem aCache.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.DOMDocum ent.4.0');
xmlDocument.asy nc = false;
xmlDocument.sch emas = schemaCache;

var loaded = xmlDocument.loa d('test20040812 04.xml');
if (!loaded) {
alert(xmlDocume nt.parseError.r eason + '\r\n' +
xmlDocument.par seError.line + '\r\n' +
xmlDocument.par seError.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:schemaLocat ion="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
1785
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 for a particular element. Is there any way to bind this to a 'select' or 'select1' element in XForms without having to list out all the choices again on the XForm: in other words it needs to grab the values straight from the schema. Any help...
0
1307
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 any installation except for an Xforms reader). The problem is, from what I've read, I cannot find clear answers to whether XForms can do everything it will need to... The challenges are as follows: - One input.xml file is generated by...
0
1431
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 whether xforms can be used to edit such dialects of xml. To be concrete, consider this toy example- Two elements exist, <evalope> and <letter>. <envalope> can contain <letter>s and other <envalope>s as follows.
0
3401
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 xmlns="" id=instance2">
0
1270
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 upon submission of the XForms document, an XML file will be generated that can then be validated by the aforementioned XML Schema document? (I think just about everyone agrees this is a big YES). Okay, if so, can I have a list of available...
9
2377
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 department's paper forms into interactive online systems. There are a couple of problems I'm facing that I'm hoping someone here could help with. Number one: browser support for XForms is pitiful, and I can't expect my target audience to download...
1
1739
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: <xforms:model id="patientModel"> <xforms:instance id="patientInstance"> <patient xmlns=""> <fname></fname> <lname/> </patient>
2
1486
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 effect to bind element. For instance the third UI control should be rendered as a calendar because its type is xs:date However, I got a normal input box instead. Also property required= “true()” has no effect. Any help is much appreciated. Here is my...
0
1030
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 defined this problem as a binding issue but I find no clue to solve it. Moreover, this example is tested on X-Smiles and firefox with plug-in as well. Your help is much appreciated Here is my xhtml doc. <?xml version="1.0" encoding="ISO-8859-1"?>...
0
8997
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8833
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9568
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9256
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8257
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6801
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4709
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4881
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2218
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.