Luis Angel is a
Language Luminary
Recap 2024
Publications:
18articles
3questions
42translations
153comments
Top Post:
5,310
people reached
User bio

I've been Software Engineer and Java Developer for 20 years with 15 years working for the HealthCare sector.

Madrid
Member since Jun 13, 2022
Replies:

Hi @Martin Staudigel you only can include DTD in the XSD if you define it using specific flags.

The solution is to create a new class to import the schema in XSD programatically. This is an example of the code:

Class XML.SchemaReader Extends %Persistent

{
ClassMethod ImportClasses(fileName As %String = "C:\Temp\example.xsd") As %Status
{
#include %occInclude
#include %occSAX
		#dim sReader as %XML.Utils.SchemaReader = ##class(%XML.Utils.SchemaReader).%New()
		#dim features as Filero.DataType.String
		set sReader.SAXFlags = $$$SAXFULLDEFAULT-$$$SAXVALIDATIONREUSEGRAMMAR
		set sReader.MakePersistent = 0
		set sReader.MakeRelationships = 0
		set sReader.GenerateXMLNILNOOBJECT = 1
		set sReader.GenerateXMLNIL = 1
		set sReader.KeepEmptyClasses = 1
		set features("BINARYASSTREAM") = 1
		quit sReader.Process(fileName,"ImportedScheme",.features)
}
}

This code will create a package "ImportedScheme" in your IRIS

Open Exchange applications:
Certifications & Credly badges:
Global Masters badges:
Followers:
Following: