Page 1 of 1

XSLT transformation error

Posted: Thu Mar 24, 2022 9:44 pm
by Aigue-marine
Hi,
I am a XML beginner and I'm using oXygen 23.1. When transforming XML to HTML with XSLT, only html code in root element can be transformed. Also, an error is report that "Cannot find the declaration of element 'sch:schema'." I don't know what it means. Could anyone help with my transformation? (Is my transformation problem related to the reported error?)
1.png
The reported error leads me to the file in left window:
2.png
Thank you so much!

Re: XSLT transformation error

Posted: Wed Mar 30, 2022 8:04 pm
by teo
Hi,

Sorry for this delayed reply. This thread was somehow omitted, but without any intention.

I examined the attached pictures, but it's quite difficult to give you a concrete answer only based on them.
Anyway, it seems to be something wrong with your XSL.
That schema named "xsltDocCheck.sch" is a Schematron schema used by Oxygen to automatically validate XSLs.

In principle, you could deactivate (my recommendation is only temporarily) the validation scenario based on that Schematron and run automatically by Oxygen for XSL validation.
You need to go to Document Type Association page in Preferences, search for the entry named XSLT, then choose the Validation tab, and uncheck the "Default" check-box to the left of the XSLT Scenario (that rendered with bold font).

Then run your transformation once again, see if you overcome the errors and check if the resulting HTML is closer to your expectations.
If you still have problems, you should send us your files (XML and XSL) for a more concrete analysis.

Regards,
Teo