Subject: Re: [xsl] Is XSLT the right tool for XML to SGML conversions From: "Liam R. E. Quin liam@xxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Tue, 23 Oct 2018 17:44:23 -0000 |
On Tue, 2018-10-23 at 15:33 +0000, Rick Quatro rick@xxxxxxxxxxxxxx wrote: > Hi All, > > > > I am at the preliminary stage of looking at a project. The input will > be > authored in XML, but the output will be SGML. Is XSLT (version 2.0) a > reasonable language for doing this? By and large yes, but it will depend on the SGML Declaration in the target as it how easy it is. In particular, the XML self-closing tag syntax, <clean-sock/>, may or may not be supported by your SGML parser. If it isn't, you can either write yur own serialization module, e.g. in Java or whatever host language is used by your XSLT 2 processor, or use the text output method - or, generate SGML but with the XML syntax and use a carefully-crafted Perl or Python script (for example) to tweak the output. Note that XSLT is a declarative language and this can take a little getting used to if you come from an imperative programming background (e.g. you can't "assign a new value to a variable"). If it's a large project and the conversion will be ongoing, you might want to invest in an XSLT course. There's plenty of people on and around this list who can help you. Liam -- Liam Quin, https://www.holoweb.net/liam/cv/ Available for XML/Document/Information Architecture/ XSL/XQuery/Web/Text Processing/A11Y consulting & training. Web slave for vintage clipart http://www.fromoldbooks.org/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Is XSLT the right tool fo, Betty Harvey harvey@ | Thread | Re: [xsl] Is XSLT the right tool fo, Dave Pawson dave.paw |
Re: [xsl] Is XSLT the right tool fo, Betty Harvey harvey@ | Date | Re: [xsl] Is XSLT the right tool fo, Dave Pawson dave.paw |
Month |