version 20010604

Abstract

VBRELAX is a verification tool for RELAX that it was made with Visula Basic version 6.0(SP4).
VBRELAX is the program of the ActiveX Server. You must make a client program to use it.

Distribution

VBRELAXEN.ZIP(include setup.exe)

Sample client source code

' Visual Basic version
Dim myObj As Object

Set myObj = CreateObject("VBRELAX.relaxParser")
If myObj.loadDocument("sample.rxg","sample.xml") Then
  Msgbox "valid"
Else
  Msgbox "invalid"
End If


// JScript version (Dynamic HTML)
var myObj = new ActiveXObject("VBRELAX.relaxParser");
if(myObj.loadDocument("sample.rxg","sample.xml")){
  alert("valid");
}
else {
  alert("invalid");
}

# loadDocument(RELAXMODULE,XMLDOCUMENT,LOADFLAG,VALIDATION)
  LOADFLAG   / RELAXGRAMMAR or MODULE / XMLDOCUMENT
  1(defalut) / url                    / url
  2          / url                    / string
  3          / string                 / url
  4          / string                 / string
  VALIDATION : Value "true" means the verification of RELAX module or RELAX grammar.

Sample client program

RELAX Workshop (IE/5 or later)

Available properties and methods

xmlDocument : return DOMDocument object
Dim sourceXML As Object
Set sourceXML = myObj.xmlDocument

parseError : return error message
Dim errMessage As String
errMessage = myObj.parseError

EXinsertBefore : insert node
Dim insertNode As Object
Set insertNode = myObj.EXinsertBefore(baseNode,newNode,refNode)

EXappendChild : append node
Dim appNode As Object
Set appNode = myObj.EXappendChild(baseNode,newNode)

EXremoveChild : remove node
Dim removeNode As Object
Set removeNode = myObj.EXremoveChild(baseNode,oldNode)

EXreplaceChild : replace node
Dim replaceNode As Object
Set replaceNode = myObj.EXappendChild(baseNode,newNode,oldNode)

EXsetAttribute : set attribute value
Dim booleanData As Boolean
booleanData = myObj.EXsetAttribute(baseNode,attributeName,attributeValue)

EXsetAttribute : remove attribute value
Dim booleanData As Boolean
booleanData = myObj.EXremoveAttribute(baseNode,attributeName)
Sample program(IE/5 or later)

Precaution

The following datatypes is being supported. (It can't be said that it is accurate.)
string,boolean,float,double,decimal,integer,long,int,short,byte,date,NMTOKEN,NMTOKENS,
ID,IDREF,IDREFS,ENTITY,ENTITIES,NOTATION
anyURI,Name,NCName

The following facet is being supported.
length,minLength,maxLength,pattern,enumeration,maxInclusive,maxExclusive,minInclusive,minExclusive


Requirment

MSXML/2.6 or later
Windows Scripting Engine/5.0 or later



copyright (c) 2001 by Yonekura Koji. All rights reserved.