Validation before or after XSLT
I am creating a FrameMaker structured application where I have to save the content as XML. I am going to apply XSLT on the export. Does the content get validated against the DTD before or after the XSLT transform?
I am creating a FrameMaker structured application where I have to save the content as XML. I am going to apply XSLT on the export. Does the content get validated against the DTD before or after the XSLT transform?
Hi Rick. It is before. The DTD or schema applies to the exported XML before it is transformed and written to disk. The opposite is true when opening a file with an import stylesheet... the DTD/schema is applied to the data after the transform. So basically the XML on disk can be anything.
Older versions of FM used to skip the transform if the validation failed. This could be a problem if there was a crash right after the save (not that FM ever crashes, mind you 🙂 You could end up with an XML file on disk with a structure incompatible with your import application, which logically would include a transform in the other direction. With FM2019 and later, it seems that it attempts the transform no matter what is the outcome of the validation, which I think is a much better approach.
Russ
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.