Validating an XForms document

Discussion in 'XML' started by Will, Aug 12, 2004.

  1. Will

    Will Guest

    I have been having problems validating an XForms document against the
    XForms schema located at

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

    <?xml version="1.0" encoding="iso-8859-1"?>
    <xf:model xmlns:xf="">
    <xf:instance xmlns=""/>

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

    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.


    Will, Aug 12, 2004
    1. Advertisements

  2. 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');

    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' +
    else {

    and I already get an error when the schema is processed, the error
    happens when the included schema for XML schema
    is processed so it doesn't look like MSXML 4 is able to help you with
    validation here.
    Martin Honnen, Aug 12, 2004
    1. Advertisements

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

    <?xml version="1.0" encoding="iso-8859-1"?>
    <xf:instance xmlns=""/>

    I do not get any validation errors, jEdit uses Xerces-J from
    Martin Honnen, Aug 12, 2004
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.