![]() |
SgmlQLSGML Query Language |
SgmlQL is a programming language for the manipulation of SGML/HTML documents. It can perform complex operations such as:
- Extract all <H1>s from a document at a given URL;
- Remove all <P>-internal tags (<I>, <B>, etc.) but keep their textual content;
- Clean up a document by removing all tags with not text inside (e.g. <I></I>);
- Change all <I>s to <B>s;
- Change, add or remove attributes of any element;
- Find out how many <IMG> elements there are in your documents;
- Extract the value of all HREF attributes from a document;
- Download an HTML/SGML file from a given URL and all files it refers to by HREF attributes;
- Convert an SGML document into an HTML document;
and more...
- Build new documents with your results;
- Use the language interpreter as a CGI filter;
- etc.
SgmlQL is based on SQL. It is a functional language, i.e., a language in which all data and program statements are expressions, or queries, and which are recursively evaluated. It allows for manipulation of numbers, strings, (SGML) names, elements, attribute-value sets, documents, and (mixed content) lists, and can perform complex operations on these objects. SgmlQL works on normalised SGML (closing tags present, etc., as output of the spam and sgmlnorm normalizers, or the nsgmls parser).
An alpha version for UN*X of MtSgmlQL, the SgmlQL interpreter, can be freely downloaded to your system for non-commercial, non-military purposes (see the user agreement). Your feedback is welcome.
![]() |
SgmlQL was developed
in the MULTEXT
project. Please send comments and suggestions to multext@lpl.univ-aix.fr. |
Copyright © Centre National de la Recherche Scientifique, 1997.
This document is only a draft and should be cited as such. Creators of WWW documents pointing to it are warned that its content and location may change without notice. This document is provided as is without any express or implied warranties. While every effort has been taken to ensure the accuracy of the information contained, the authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein. Permission is granted to make and distribute verbatim copies of this document for non-commercial purposes provided this copyright, disclaimer and permission notice are preserved on all copies.