Operating System - OpenVMS
1753776 Members
7213 Online
108799 Solutions
New Discussion юеВ

Re: Validating parser for XML on VMS

 
SOLVED
Go to solution
Derek Garson
Frequent Advisor

Validating parser for XML on VMS

I am looking for a validating XML parser that runs under VMS.

It needs to support XML schemas as XSD. DTD would be a bonus.

It needs to support XML namespaces.

It needs to be available for Itanium. Alpha would be a bonus.

I have looked at http://h71000.www7.hp.com/openvms/products/ips/xml/ "XML Technology for OpenVMS".

I don't think the Java version is going to work very well because I think I would have trouble invoking Java methods from the existing application code. Is it even possible to do this?

I have concerns that the C version is not going to work very well due to name mangling i.e. it's really a C++ version. Is that correct? There might only be name-mangled entry points. Can someone who has it installed confirm?

The calling language is, believe it or not, DIBOL. Code in that language can call external routines that conform to the VMS calling standard. I imagine that legacy applications written in COBOL or FORTRAN would face the same challenge.
7 REPLIES 7
Craig A Berry
Honored Contributor
Solution

Re: Validating parser for XML on VMS

What you want is libxml2:

http://xmlsoft.org/

There's also expat, but it's not validating (only confirms well-formedness, not compliance with a DTD or schema).

There have been pre-built versions of libxml2 on one or more VMS freeware CDs, and the authoritative sources have VMS build support, though it may not be up-to-date. I have run it successfully on OpenVMS Alpha v7.1 as well as other releases in the current century. I don't know of any reason it wouldn't work on Itanium.

Calling libxml2 from DIBOL might be more fun than you deserve. Does DIBOL support ASCIZ (zero-terminated) strings natively? If not, you either need to concoct a way to build them or write wrapper routines in C that accept string descriptors, build ASCIZ strings, and then pass them along to the C interfaces. I've seen linked lists written in COBOL, which just means anything is possible with the VMS calling standard, but it doesn't mean everything is readable, maintainable, or easy.

As far as name mangling, libxml2 will have this problem to some extent as well, IIRC, because there are a few symbols that are longer than 31 bytes. One thing you can do is root around in the compiler-generated name mangling database (after building with CC/NAMES=SHORTENED) to see what the symbol names are that you'll need to use. You can also search the c.o.v archives for details of the polynomial used to generate the shortened names if for some reason you want to cook up your own method to generate them.


Robert Gezelter
Honored Contributor

Re: Validating parser for XML on VMS

Derek,

I have not looked at the XML package from the perspective of calling it from DIBOL. However, I have dealt with quite a few situations involving C++ libraries that need to be called from C and other non-"name-mangling" languages (including calling C++ routines from Java, which has other issues).

It would have to be verified, but the name mangling issue is easily dealt with by creating a C++ jacket that advertises appropriate non-mangled entry points, and does nothing but call the mangled entry points with the same parameters (such an entry point can also make sure that there are no problems with data structures).

If it is a simple matter of external name mapping, one can address that issue in a straightforward fashion by creating a shareable library. The Linker allows the specification of alias entries (see section 4.2 et seq. of the Linker manual, available from http://www.hp.com/go/openvms ).

Please let me know if I have been unclear or can be of additional assistance.

- Bob Gezelter, http://www.rlgsc.com
Ian Miller.
Honored Contributor

Re: Validating parser for XML on VMS

I see that Relax NG validator runs on OpenVMS
http://www.eight-cubed.com/blog/archives/000990.html

Does that help?
____________________
Purely Personal Opinion
Craig A Berry
Honored Contributor

Re: Validating parser for XML on VMS

Ian,

According to the home page:

http://www.relaxng.org/

RelaxNG is a schema language. A validating parser can take a schema written in a schema language and check whether documents follow the rules described by the schema -- that's what validation is. But a schema language is not itself a parser.
Hoff
Honored Contributor

Re: Validating parser for XML on VMS

I had some difficulty getting the Xerces and Xalan port working, so I ported libxml2 over. This libxml2 port is available on the OpenVMS Freeware.

http://mvb.saic.com/freeware/freewarev80/libxml2-2_6_24/

Far from the newest libxml2 these days, but it's functional.


Derek Garson
Frequent Advisor

Re: Validating parser for XML on VMS

Hoff,

Did I miss something? Was it actually made available for IA64?

I pulled the FREEWARE CDs out of the little pouch that came with my shiny new Itanium server and when I look on the CD, I see executables that appear to be for Alpha. (Volume label is FREEWARE80_2.)

Did I grab the wrong bunch of CDs? We have lots of CDs.
Jean-Fran├зois Pi├йronne
Trusted Contributor

Re: Validating parser for XML on VMS

Derek,

I have a PCSI kit of libxml2 2.6.32 and libxslt 1.1.21 (used by some Python XML libraries)
I can put the 2 libraries online if you want.
All compiled using /name=(as_is,short)

JFP