XML Validation question - v9.1D

smt62

New Member
Quick question. v9.1D Windows XP.

Writing some code to load/export XML data into/from a Db.

Question #1:
Load code works fine, reads the data in. But, it errors out when I turn on validation using the X-DOCUMENT LOAD method.

I've validated both the test XML file and its accompanying external XSD file using Altova's XML Spy. XML Spy indicates that both are well-formed and contain valid content.

Does validation work only with DTDs in v9? I'd like to be able to validate inbound XML files.


Question #2:
Export code works fine except that when I attempt to validate the resulting XML file using the Altova's XML Spy, XML Spy complains that there is no DTD. Browsers (IE) load the resulting XML just fine. It looks right.

Is there a function in v9 that will generate the DTD? Embed it in the resulting XML file? Write it as a separate DTD file? Or do I have to write code to generate DTDs?

I want to make sure that the XML data I generate will be able to pass whatever validations my recipients apply.


Thanks!

Scott

PS Any links to good examples/recipes of XML-related routines written in 4GL would be appreciated.
 

RealHeavyDude

Well-Known Member
#1 Progress 9.1d does not support XML schema and, AFAIK, neither does 9.1e. Thefore as soon as you don't upgrade (AFAIK at least to OE10.1a) you're stuck with DTD.

#2 You need to be careful when opening a XML document that specifies an external DTD (same would be true for XML schema) relatively (not with an absolute path) so that the tool will find the external DTD. Depending whether you just double cliecked or used open file the DTD might not be in your path ...

HTH, RealHeavyDude.
 

smt62

New Member
Thx Dude.

Is there a 4GL function to generate DTDs? Or can you point me to any sample 4GL code that generates DTDs?

Thx again for replying.

Scott
 

RealHeavyDude

Well-Known Member
I hate to say, but AFAIK nope.

I would recommend you to use the Altova XML Spy for generating the DTD. If you need to work a lot with XML I would also urge you to ugrade to a more recent OpenEdge version since what you will maybe also miss in Progress 9 is the SAX-WRITER.

Pls, don't get mad at me, but Progress V9 is 10 (in words ten) year old technology and Progress just was beginning to add XML capabilities into the product ...

HTH, RealHeavyDude.
 

smt62

New Member
Hey Dude,

Thanks again for gettin' back to me. I wouldn't get mad at ya. Not your fault I'm working with an older version of the 4GL. Don't have the luxury of upgrading at the moment so I have make do. Just trying to make sure I validate inbound data and generate valid data outbound.

Have a good one.

Scott
 
Top