I am working on BridgeLink 4.6.0, and I need to validate XML files (CCD/CCDA) using XSD schemas.

Earlier versions of BridgeLink allowed Java access inside JavaScript (e.g., Java.type, Java.extend, LSResourceResolver, etc.), but in 4.6.0 all Java integration in transformers has been disabled.

Because of this, my previous approach no longer works.

What I tried

  • Stored all XSD files (CDA.xsd, POCD_MT000040.xsd, datatypes.xsd, etc.) in Lookup Manager

  • Loaded the XSD content via LookupHelper.get()

  • Attempted to create multiple StreamSource objects and set systemId

  • Tried to use LSResourceResolver to resolve imported XSDs

Example attempt:

var xsdText = LookupHelper.get("SchemaFiles", "CDA.xsd", ttl);

var reader = new java.io.StringReader(xsdText);

var src = new javax.xml.transform.stream.StreamSource(reader);

src.setSystemId("CDA.xsd");

But BridgeLink 4.6 throws errors like:

  • "Java is not defined"

  • "JavaPackage javax... is not a function"

It seems Java access is completely disabled in 4.6.0 script engine.

My Problem

I want to validate XML using XSDs stored in Lookup Manager, including all dependent XSD imports, without loading files from the file system.

But:

  • No Java classes are available

  • No LSResourceResolver

  • No ability to load multiple StreamSources

  • "XML Validator" step does not exist in BridgeLink 4.6

Questions

  • Is it still possible in BridgeLink 4.6.0 to validate XML against an XSD (with imports/includes) directly in a transformer?

  • Is there any supported way to resolve dependent XSDs stored in Lookup Manager?

  • Did BridgeLink officially remove Java access in 4.6, making Java-based XSD validation impossible inside JS transformers?

  • What is the recommended alternative workaround?

  • External XML validation API?

  • Custom Java plugin?

  • Merged XSD file?

Goal

I want to eliminate file system–based XSD loading and validate using schemas stored inside BridgeLink.

Any official guidance or working example for BridgeLink 4.6 would be great.

1 Reply 1

We are using Service Oriented architecture for any XQuery 4.0, XSLT 3.0, and XSD 1.0/1.1 validation. It makes it independent regardless what OS, language, etc. need such services. It is callable via REST HTTP calls. All files, i.e. *.xml, *.xsd, *.xslt, *.xq, are on a file system share.

It is very likely that it is possible and practical in your environment.

Such setup is done via the following components:

  • BaseX 12.0
  • Xerces 1.0/1.1 XSD validator or Saxon
  • Saxon for XSLT

Your Reply

By clicking “Post Your Reply”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.