language and parsing
Las clases contienen la habilidad de transformar al formato DocBook XML pero esta función tiene muchos bichos todavía. q: Que es un wiki?
El inventor del Wiki es Ward Cunningham
http://c2.com/ y es una manera de editar documentos del WWW sin
utilizar HTML. También hay una philosophía de la libertad del lector
a editar todo lo que quiera, que en principio parece muy anarquista
pero resulta en realidad, muy util. (Por ejemplo http://www.wikipedia.org)
q: ¿Que hay en el directorio "edit"?
este link:///edit/
ectorio contiene un editor de texto que
esté diseñado para editar fichas que sean ubicado en servidores
remotos de tipo SSH.
q: ¿Como escribo en documento FAQ (preguntas mas frequentes)?
Puedes mirar, por ejemplo la ficha link://web.es.txt, que es la ficha que estás leyendo ahora. Empiezas con el código [ FAQ ] y terminas con el código [/ FAQ ]. Luego escribes preguntas empezando con q y un colon.
q: ¿Que significan los códigos en las fichas de texto?
Son una manera para conseguir estructura en un documento de texto que no tiene otro formato. Hay muchas maneras para conseguir eso, como XML, HTML etc pero todas maneras tienen sus ventajas y desventajas. These are a way to provide some structure in an unstructured text document. The codes indicate to the transformation engines the sort of text which it is dealing with. For example this faq document is enclosed in [ faq] [ /faq] tags to indicate to the transformation engine that it is dealing with an FAQ style document. Html also uses tags, but many more. The idea of this transformation engine is to use as few tags as possible and to make them of a semantic nature rather than of a visual or layout nature. For example, the FAQ tags say something about the 'meaning' of the text within the tags rather than saying anything about how the document should be layed out or formatted when it is displayed visually. The idea of this is to remove from the writer the burden of having to decide how the document should look when he or she is attempting to write. The writer can decide how the document should look afterwards. Also, if you look at the link://web-faq.txt 'text file' which these HTML pages were generated from, you will see that the 'source' is quite clean. That is to say there are very few tags in the text files, which makes them easier to read and I believe easier to maintain. This is based on the principle that it is better and more creative to think about one sort of thing at a time. q: Are there any similar systems to this available? There are many wiki systems available, many of them far more powerful than the current system. There are also some systems which emphasize having minimal tags in the source files for example the http://daringfireball.net/projects/markdown/ 'Markdown' system. The markdown system seems to have the same philosophy as the current system. Also there appears to be a http://www.michelf.com/projects/php-markdown/ 'Php Markdown'. These systems are no doubt much more advance than the current one, and you would be well advised to use them if you want to create a web site. The current system is only in its initial stages and may not be continued. It appears that Markdown still allows the writer to put formatting code into the text document. Therefore I feel that my system has a slightly different outlook from Markdown. This system attempts to encourage the writer to think about semantic content rather than visual content, but does not force the writer to categorize his or her writing. http://paginas.fe.up.pt/~villate/parsewiki/ This is a system which can transform to other formats apart from html but uses a normal style wiki syntax. q: Why not use XML for the document format?
net/logo.gif]'
should insert the logo image in the faq document. However
the exact location in the document is not really
controllable at the moment.
q: What does the '[webdir]' tag mean?
This tag allows the insertion of a set of links from
another web-page in the rendered document. For example-
'[webdir http://www.yahoo.com]'
would insert all the links from the yahoo page into the
rendered document. Please note that this component is
only in a development stage. For example the links from
the page are not transformed to make them useable from
a different server.
q: What does the '[gloss]' tag mean?
This tag starts a glossary section.
q: What does the '[howto]' tag mean?
This tag starts a procedure section. A procedure section
contains a series of steps which represents a set of
instructions of how to do something. This tag and
functionality is not properly implemented.
q: How can I stop a tag from being transformed by the code?
You can enclose the tag in single quote characters as I have
done in the examples above. (Actually only the leading quote
matters). If there had not been enclosed in quotes they
would have been transformed by the code engine.
q: Can I put footnotes in a document?
In theory this should be possible and is handled by the
link://FootnoteSection.java class and other classes, but
the functionality is still in a developmental phase
q: Is this page dynamically generated?
No. which means that the file listing which may occur on this page may not
be entirely up-to-date.
q: what is in the /edit/
ectory?
This directory contains the beginnings of a text editor
written in java. The editor is orientated towards saving
on a ssh server via sftp. this is mainly because this is
the only way to save to the sourceforge server.
q: Can I use lists in documents?
There is a link://PlainList.java class which will recognize
and render lists in Html but I have left it out of the
faq document class for reasons of simplicity. There is also
a link://PlainListDocument.java class which is a document
which can contain some text and a list. But this is not
that useful really. The syntax of a list is, for example-
/lang/web/TextLink.java
which should be rendered as link://TextLink.java etc.
Also, in order to change the display text of the link you
can use a format such as, for example-
http://www.google.com 'google'
which should render as http://www.google.com 'google'
This syntax is not as good as the text before the link
but easier to parse.
q: How do I include an example block in a document?
The MixedText class has support for example blocks. Since
the FaqDocument class also uses the MixedText class you
may also use example blocks in faqs. An example block
is not transformed in any other way- The example block is
started with text such as 'for example:' or 'for example-'
or 'type-' or some other similar text.
Look at the source text file for a better idea.
q: What kind of markup does this system use?
First it is convenient to understand the connotations of
the phrase 'plain text'. This is a vague phrase but it means
something quite specific within the context of computer
systems. Historically it means text using a limited set
of characters or codes which could be represented by the
latin alphabet as well as some punctuation marks. This was
often referred to as the ASCII character set.
The concept is not that simple to explain but is easiest
to grasp by exclusion. A microsoft word document is NOT
plain text because it contains codes whose purpose is
to provide information about the formatting visually of the
document and those codes are not themselves characters or
letters.
Plain text is important because the internet is built on
plain text protocols and because plain text acts as a
useful interchange format between different types of
computers.
The transformation code here uses plain text transformations
and plain text markup codes. The upshot of this is that
documents can be written in any text editor such as
Microsoft Notepad or Unix Vim and then transformed to a
'fancy' format such as HTML.
q: Why is the faq a popular format?
Maybe because it has overtones of a dialog, in a socratic sense.
It also allows people to make up questions for themselves to
answer which some people enjoy.
q: Can I use FOSF, (Field Ordered Standard Format), the so-called
linguistic 'back-slash' format in a document?
No, why would you think that you could? What a strange question.
Well actually I would like to support this format in a
document to allow linguists to easily include their field
data in a document but there is a slight problem. The
problem is that the backslash codes are not standardized. That
is a particular backslash code meaning depends only on the
decision of the linguist using it.
q: Why support FOSF linguistic backslash codes?
It would be an easy way to provide a dictionary rendering of
linguistic data without transforming to xml.
[/faq]