homenewslegalreferencedownloadfaqlinksabout
TRASHY (Tags Resized and Alternative Syntax for Html made by Yayo)

T ags
   R esized and
      A lternative
         S yntax for
            H tml, made by
               Y ayo
( php code version )



versions: TRASHY (syntax, aliases and associations): v 1.0
code for PHP: v 0.1
released:10 Feb 2006
license:GNU GPL (General Public License) v.2
author:yayo (Roberto Correzzola)
SF page:http://sourceforge.net/projects/trashy



What is TRASHY?


     TRASHY is a way to write HTML code using only a few characters, reducing the amount of typing errors, space wasted, helping you to arrange code, and providing an easy way to avoid some common HTML mistakes (like a wrong sequence in closing tags).

     Why write the attrib height thousands of times in HTML code? Wouldn't it be much easier to write h, instead?
And what about closing 5 tags with a single character, without spending time getting the correct sequence? :D


How does it work?


     TRASHY is written in the form of a function which you must link to your php code. An alias is provided for each tag and each attribute.
Each time you need to write HTML code pass it as the argument of TRASHY function, using aliases for tags and quoting normal text with some special characters.
The function parses your code char by char and expands each alias by exchanging it with the corresponding tag.
Text which is quoted with special characters is not parsed but simply copied as normal text, instead.

     TRASHY keeps track of the tags you open step-by-step, so when you need to close a tag you only need to use 1 standard-close-tag character, and TRASHY closes the last opened tag(s) for you.

     TRASHY uses a map of parent/child tag dependencies, created from the W3C strict HTML 4.01 Document Type Declaration. By using this map it can only expand allowed tags and help you to write valid HTML code. Aliases which lead to an incorrect sequence are ignored.

     TRASHY can be used and reused many times all over your php code. Tag history is stored in a global array, so you can close the function when you need to add some php code and then reopen a new TRASHY session to go on with HTML code just from the same point you left before.

     TRASHY lets you attach all the attributes (and values) you need to each tag using special attribute-aliases.

     TRASHY ignores spaces, tabs, CarriageReturn and LineFeed characters and lets you use them to arrange and indent your code in the same way as normal HTML, to make it ordered and more readable.
You can also add comments to your TRASHY code.

     TRASHY can also help you to reduce the size of your php code (to 2/3rds of the equivalent HTML space). Also TRASHY produces compact HTML, with no spaces, no tabs, no CR or LF characters.


     And, yes.. all the pages of this website are written with TRASHY! :D


     To learn more about TRASHY start reading the reference guide.


This software and its documentation are licensed under the terms of the CC-GNU GPL license v.2! SourceForge.net LogoThis page is valid -//W3C//DTD HTML 4.01 Strict//EN!
This page uses valid CSS!
This site conforms to the W3C-WAI Web Content Accessibility Guidelines.
This site conforms to the US Government Section 508 Accessibility Guidelines.
All the pages of this website/documentation, as well as the TRASHY software itself, are released under the terms of the CC-GNU GPL license v.2.

End of page      -      TRASHY (C) 2005 yayo (Roberto Correzzola)