Proponents of the programming language Prolog share the opinion Prolog is more appropriate for transforming XML-documents as other well-established techniques and languages like XSLT. In order to clarify this position this work proposes a tuProlog-styled interpreter for parsing XML-documents into Prolog-internal lists and vice versa for serialising lists into XML-documents. Based on this implementation a comparison between XSLT and Prolog follows. First, criteria are researched, such as considered language features of XSLT, usability and expressibility. These criteria are validated. Second, it is assessed when Prolog distinguishes between input and output parameters towards reversible transformation.
翻译:Prolog 方案语言的倡导者同意,Prolog 比较意见更适合于将XML文件与XSLT等其他成熟的技术和语言一样转化成XSLT。为了澄清这一立场,这项工作提议用tProlog式的解释器将XML文件分解成Prolog内部清单,反之亦然,将清单分解成XML文件。在此执行的基础上,对XSLT和Prolog作比较。首先,对标准进行研究,例如XSLT的考虑语言特征、可用性和可表达性。这些标准得到验证。第二,在Prolog将输入参数和输出参数区分为可逆转换时进行评估。