Home
XSLT Processor
Website Editor
Products
CGI XSLT Engine
Website Content Editor
Downloads
Information
Support & Contact
Last updates
Discount software
CGI XSLT engine - Perl XSLT parser

Our XSLT engine is a server-side solution for XML/XSLT combination. It is written in Perl. The XSLT parser has almost no prerequisite Perl packages. It can read parameters and files passed by a browser through HTML form. It has simple mechanism for xml files update and creation. The XSLT processor is ready for use CGI program. The parser implements all main XSLT 1.0 instructions. It supports both unicode and bytes characters models. And, It has sufficient performance for many problems.

CGI XSLT processor doesn't support all XSLT 1.0 instruction and functions. Also it has a few extension functions. The parser treats result tree fragments as in XSLT 2.0. Namely, they are always converted to node-sets. The XSLT processor uses different method for conflict resolution of template rules which can be explained as follows. The more informative the template pattern is the higher priority it has. Local variable declared can be accessed in any template called after its declaration. This simplifies the development of XSLT programs in many cases. We do not support URLs either. All files, XSLT stylesheets and XML sources, must be on the local host. However, external entities can be used for remote XML sources processing.

Since version 1.5 CGI XSLT processor can load Perl modules that implement extension instructions and functions.

Overview of XML and XSLT

The most remarkable thing concerning XML is that you need to understand just one sentence to use it. Here it is "Extensible Markup Language, abbreviated XML, describes a class of data objects called XML documents and partially describes the behavior of computer programs which process them" (W3C RFC-xml). Let read it word by word.

Markup. Elements of markup are the named brackets called tags. There are the open tag <elementname> and the close tag </ementname>. The string between them is an element content. It consists of text and other markup elements (tags). The text strings are the data of XML document. The tag elements with their content are the data objects. The data object can have attributes as well (<el a1="1">...</el>). You are surely familiar with all this since HTML documents have the same structure. One thing is worth mentioning empty elements are represented now as <elementname/> (not just <elementname>).

Extensible. The word extensible means ultimately that XML has no predefined element names (tag names). If this is the case what can you do with XML? Nothing! You should first determine what data objects you need and name them. Sometimes, it can be difficult, however, once created the markup can be reused.

Language. Despite XML RFC has a small set of definitions that allow you to declare types of data objects XML is not a programming language. It is better to say it states the grammar of language family. Each language in this family has its own semantics and intent of usage.

The computer program, which processes xml files, is XML parser (processor). Almost 80% of the content of W3C XML Recommendation are dedicated to the developers of XML parsers.

XSLT is a language for transforming one XML document to other XML (or HTML) document (W3C RFC-xslt). It belongs to XML language family. XSLT programs are conventionally called stylesheets. However, they are not stylesheets in the usual sense and have no relation to CSS. Modern browsers support XSLT language but XSLT program does not provide a browser with the information about how it must render the XML document. Instead it instructs the browser: transform the document to a new one and then render this new document. We can do this transformation on the server side compiling the data files to the formats ready for rendering. To be a publishing tool XSLT must have an instruction that tells XSLT processor where the result document must be saved. It is not a problem and our Perl XSLT engine has it.

Update, delete and insert operations are also operations of data transformation kind hence XSLT language is capable to describe them. A missing point here is that XSLT language has no protocol for parameters passing. CGI XSLT processor has it. The XSLT parser uses HTTP protocol to read parameters passed by HTML forms. This gives much more power to XSLT stylesheet. The XSLT stylesheet can now generate and process HTML forms.

DOM and XSLT

The "save to file" instruction we have added to the XSLT engine makes XML/XSLT and XML/DOM completely interchangeable (just "save the result to file" is not enough for this claim). Any DOM application can be redesigned in XSLT application and vice versa.

DOM object on a server is created through parsing XML file each time the program called. The same statement is true for XSLT. In theory DOM must be faster for simple transformations (attribute value update or something similar). We assume that XSLT engine does not use DOM object insight. If it is DOM is always faster. XSLT is easier in use and is much more productive tool.

More details
Copyright © 2004 www.dopscripts.com