Name:
Location: Columbus, Ohio, United States

Tuesday, October 26, 2004

Using GRML


Creating files and web pages using GRML.

Introduction

This article explains the tags, syntax, and format of GRML 2.0 (General Reuse Markup Language), a data defintion markup language. This contrasts HTML, PDF, or other display-oriented formats or markup languages. GRML is similar to the CSV format or XML, because it focuses on content structure, rather than content display.

Web browsing is possible with GRML because it uses ASCII text, the same as HTML. Just as there are web browsers for HTML, the same is true for GRML. Both use web servers, text, images, and hyperlinks. They both use static and dynamic web pages. Both support ASP, .NET, CGI, PHP, or JSP. They both use the web, but in different ways.

Background.

Before using GRML, it is important to know how it differs from other formats and markup languages. Introducing GRML describes the circumstances for creating the markup langauge and covers its strengths and weaknesses. It is recommended to read it first.

To understand its history, read Understanding GRML. It describes the path taken to arrive at GRML 2.0. It sets the timeframe and requirements for developing the latest version of the markup language.

Getting Started.

First, it is important to understand what GRML is and what it is not.

GRML is not for:
  • unstructured data (e.g., articles, stories, letters);
GRML is for:
  • structured data (e.g. databases, spreadsheets, or character-delimited files);
  • web data (e.g. search engines, news headlines, auction listings, etc.);
  • dimensional data (e.g. forecasting, modeling, time series, etc.);
  • links (files);
  • hyperlinks (web pages); and,
  • images.
Knowing the type of content GRML handles, the next step is to examine the tags used to create input controls, columns, and results.

Tag types.

GRML uses form tags and view tags. The form tags create the input controls in a viewer (viewers display content from GRML files or web pages). The view tags create columns and results.

Every tag supports a name. For form tags, the name is used to associate a value to the input control when sending a request. When it is a view tag, the name is used to create a dimension (i.e. group) of columns and results. While a name is required for form tags, it is optional for view tags.

When GRML reads a line, the tag is read first. All tags use a parent-child relationship to specify values. The parent tag defines the type of tag, whether input control, column or result. Each child tag sets the attributes. Parent tags have closing tags and may use a name. Child tags do not have closing tags and do not use a name.

All tags reside on one line. Once the end of the line is reached, the next tag is read. Once a parent tag is read, everything else on that line is ignored. Child tags are read using an <attribute>value pair. Once the carriage-return or line-feed is reached, the attribute value is set and the next tag is read.

Form tags.

The following shows parent-child form tags.

<edit url1>
<title>Enter URL:
<text>http://127.0.0.1
</edit>

The above GRML creates an edit input control with a name of url1. It has a title of Enter URL: and it displays http://127.0.0.1 in its input area. The parent tag is <edit url1> and the child tags are <title> and <text>.

There are other input controls using form tags, such as combo boxes, list boxes, calendar controls, spin controls, or radio buttons. They all follow the same pattern.

The following creates a submit input control.

<GRML>
<edit url1>
<title>Enter URL:
<text>http://127.0.0.1
</edit>

<submit>
<location>GRMLBrowser.com/webpages/rss.asp
<text>Submit
</submit>
</GRML>

A form tag is used to add a submit button input control. Without it, there is no way to send a form request. Submit has a location attribute, which determines where the form values are sent. In this case, the request is sent to GRMLBrowser.com/webpages/rss.asp. Notice, there are no end tags for any of the <attribute>value pairs.

These are some form tags supported by Pioneer Report MDI.

<edit name> Parent
<text> (sets the input value)
<title> (sets the label)
</edit>

<combo name1> Parent
<item> (sets item value)
<title> (sets the label)
</combo>

<submit>
<location> (sets the form destination)
<text> (sets the button text)
<title> (sets the label)
</submit>

<dimension>
<name> (not covered in this article)
</dimension>

These tags and <attribute>value pairs are form tags. The next step is to create columns and results, with view tags.

View tags.

There are two types of view parent tags, column and result. Each supports a name, when using dimensions. Since dimensions are not covered here, only tags without a name are discussed.

When creating columns in GRML, a column order is defined. The column order is the order of <attribute>value pairs using the column parent tag. It is called a column order because a viewer displays each column in descending order as it appears in the column parent tag.

<GRML>
<column>
<
MyFirstColumn>
<Another column>
</column>
</GRML>

Two columns are created using view tags. The first column is MyFirstColumn. The second is Another column. No results are shown because none have been added. To add results, using the column order above, the result parent tag is used.

<GRML>
<column>
<
MyFirstColumn>
<Another column>
</column>

<result>

<MyFirstColumn>Hello, world.
<Another column>This works!

</result>
</GRML>

A result has been added, containing two result items, using view tags. MyFirstColumn has the value Hello, world.. Another column has the value This works!.

With an understanding of the different tags used in GRML, it is now possible to understand what is happening in a GRML file or web page. The next section presents more ways to create input controls, columns, and results using form and view tags.

Examples.

There is more than one way to organize tags to create input controls, columns, and results. This allows a file or web page to organize its content in many different ways. The following two sections demonstrate these alternatives.

Form tag examples.

The form tags create input controls. Below are two examples for creating input controls in different ways.

Example 1.

<edit search1>
<Title>Request:
</edit>

<Combo Default>
<Title>Default location
<monster>monster
</combo>

<submit>
<location>GRMLBrowser.com/jobs.asp
</submit>

Example 2.

<edit search1>
<Title>Request:
</edit>

<Combo Default>
<Title>Default location
</combo>

<Combo Default>
<monster>monster
</combo>

<submit>
<location>GRMLBrowser.com/jobs.asp
</submit>

Example 1 has all attributes for an input control in one parent tag. Example 2 has one attribute for each parent tag. Both examples create the same input controls, though the tags are organized differently.

View tag examples.

View tags create columns and results.

Columns.

Use the column tag to set the column order of results. Below are two examples.

Example 1.

<column>
<Date Posted>
<Job Title>
<Job Location>
<Company>
<Search>
<DateTime>
<Link>
</column>

Example 2.

<column>
<Date Posted>
<Job Title>
<Job Location>
<Company>
<Search>
</column>

<column>
<DateTime>
<Link>
</column>

Example 1 has all attributes using one column parent tag. Example 2 splits the attributes in two, each using a column parent tag. Both examples create the same column order.

Results.

Having created columns, the next step is to add results. This requires the result parent tag. Below are two examples for adding results to the above column order.

Example 1.

<result>
<Date Posted>Jul 28
<Job Title>Sr. Java Software Engineer
<Job Location>US-CA-La Jolla
<Company>Company A
<Search>Java LA
<DateTime>Today
<link>http://127.0.0.1

<Date Posted>Jul 20
<Job Title>Web Development Analyst
<Job Location>US-WI-La Crosse
<Company>Company B
<Search>Java LA
<DateTime>Today
<link>http://127.0.0.1

<Date Posted>Aug 2
<Job Title>Software Group Manager
<Job Location>US-CA-La Mirada
<Company>Company C
<Search>Java LA
<DateTime>Today
<link>http://127.0.0.1
</result>

Example 2.

<result>
<Date Posted>Jul 28
<Job Title>Sr. Java Software Engineer
<Job Location>US-CA-La Jolla
<Company>Company A
<Search>Java LA
<DateTime>Today
<link>http://127.0.0.1
</result>

<result>
<Date Posted>Jul 20
<Job Title>Web Development Analyst
<Job Location>US-WI-La Crosse
<Company>Company B
<Search>Java LA
<DateTime>Today
<link>http://127.0.0.1
</result>

<result>
<Date Posted>Aug 2
<Job Title>Software Group Manager
<Job Location>US-CA-La Mirada
<Company>Company C
<Search>Java LA
<DateTime>Today
<link>http://127.0.0.1
</result>

Example 1 has all results using one result parent tag. Example 2 splits the attributes using multiple result parent tags. Both examples create the same results.

Putting it all together.

When a column parent tag is read, the child tags create the column order. This determines the order of display of columns. When a result parent tag is read, the child tags are added if the attribute exists in the column order.

Each item is added as it is encountered. The top column in the column order displays first. The bottom displays last. This is true for results. The top result with an attribute in the column order displays first. The bottom result with an attribute in the column order displays last.

Below are the combined form and view tags for the two examples.

Example 1.

<grml>
<edit search1>
<Title>Request:
</edit>

<Combo Default>
<Title>Default location
<monster>monster
</combo>

<submit>
<location>GRMLBrowser.com/jobs.asp
</submit>

<column>
<Date Posted>
<Job Title>
<Job Location>
<Company>
<Search>
<DateTime>
<Link>
</column>

<result>
<Date Posted>Jul 28
<Job Title>Sr. Java Software Engineer
<Job Location>US-CA-La Jolla
<Company>Company A
<Search>Java LA
<DateTime>Today
<link>http://127.0.0.1

<Date Posted>Jul 20
<Job Title>Web Development Analyst
<Job Location>US-WI-La Crosse
<Company>Company B
<Search>Java LA
<DateTime>Today
<link>http://127.0.0.1

<Date Posted>Aug 2
<Job Title>Software Group Manager
<Job Location>US-CA-La Mirada
<Company>Company C
<Search>Java LA
<DateTime>Today
<link>http://127.0.0.1
</result>
</grml>

Example 2.

<grml>
<edit search1>
<Title>Request:
</edit>

<Combo Default>
<Title>Default location
</combo>

<Combo Default>
<monster>monster
</combo>

<submit>
<location>GRMLBrowser.com/jobs.asp
</submit>

<column>
<Date Posted>
<Job Title>
<Job Location>
<Company>
<Search>
</column>

<column>
<DateTime>
<Link Location>
</column>

<result>
<Date Posted>Jul 28
<Job Title>Sr. Java Software Engineer
<Job Location>US-CA-La Jolla
<Company>Company A
<Search>Java LA
<DateTime>Today
<link>http://127.0.0.1
</result>

<result>
<Date Posted>Jul 20
<Job Title>Web Development Analyst
<Job Location>US-WI-La Crosse
<Company>Company B
<Search>Java LA
<DateTime>Today
<link>http://127.0.0.1
</result>

<result>
<Date Posted>Aug 2
<Job Title>Software Group Manager
<Job Location>US-CA-La Mirada
<Company>Company C
<Search>Java LA
<DateTime>Today
<link>http://127.0.0.1
</result>
</grml>

The above examples demonstrate the different ways to organize GRML to create the same input controls, columns, and results.

Scope of use.

Some GRML viewers do not display columns. It may only display images, or links, or partial text. For example, Pioneer Report MDI uses its thumbnail view to display an image and a result item appearing first in the column order. However, all GRML files or web pages require columns, if results are displayed.

Now that it has been shown how GRML uses input controls, columns, and results, it is possible to use the above example to create just about any type of GRML file or web page. There are form tags for handling user input and sending requests. There are view tags to display file or web page columns and results.

The only limitation of the above GRML is it does not demonstrate dimension tags. It is a topic discussed in another article. To respond to a request submitted using input controls, server-side processing is required. A server-side scripting, or programming language, such as ASP, JSP, CGI, .NET or PHP is needed. These techniques are discussed in another article.

Conclusion.

Well, that is it. It was shown that all GRML files and web pages consist of two types of tags. One is the form tag, for creating input controls. The other is the view tag for creating columns and results. There are parent tags to create input controls, a column, or a result. And, there are child tags to set the attributes of the parent tags. Only parent tags have end tags, while child tags do not.

Knowing the different tags in a GRML file or web page provides the basis for learning other aspects of the markup language. Once familiar with the different tags, the next step is to learn how to use server-side processing with form requests and how to use the dimension tag.

To get all the information available for GRML on the web, visit GRML, CSV, and delimited file and web browsers with product descriptions.

Sunday, October 17, 2004

Examining GRML

Different uses of GRML.

Introduction.

There are many different uses for General Reuse Markup Language, or GRML. There are file and web browsers to load and download GRML files and web pages. There are reporting and analysis tools to create graphs, statistics, or charts from GRML. There are productivity tools to use database and spreadsheet data in GRML. They are all different uses. This article describes the five (5) different uses of GRML.

Background.

Before reading this article, it is recommended to have an understanding of GRML and its development. To get started, read Introducing GRML. This article explains the reasons for its existence and how it compares to existing formats and markup languages. Next, read Understanding GRML. It provides a history of the markup language and describes how it has developed into its current format.

After reading these articles, download a GRML web browser, such as Bar Graph MDI or Tree MDI. They show how GRML is used and what it does. These web browsers demonstrate a number of uses for GRML. These uses are described below.

GRML Uses.

There are five (5) different uses of GRML. It is used for reading, writing, viewing, adapting, and editing. These uses allow GRML to open, display, change, save, or print content using files, web pages, databases, spreadsheets, or other data sources. The acronym for these uses is WAVER. It refers to the first letter of each of the five (5) uses of GRML.

GRML web browsers are described using WAVER in their product descriptions. For example, the Bar Graph MDI product description only mentions requiring a reader, while Tree MDI requires every use of GRML. Each use is described below.

Reader.

Readers read and parse GRML.

Writer.

Writers save using GRML.

Adapter.

There are two uses of an adapter.
  • read GRML and write (save) in another format.
  • read another format and write (save) in GRML.

Viewer.

Viewers display GRML after reading.

Editor.

Editors use a viewer to display GRML for editing, and a writer to save it.

Web browser uses.

Web browsers use a reader to download and read web pages. Some use an adapter, viewer, editor, or writer. But, they are not required by a web browser. At a minimum, a web browser uses a reader.

Bar Graph MDI only uses a reader. It is an example of a web browser that does not use GRML in any other way. It does not adapt, display, edit, nor write GRML. Instead, it displays graphs of GRML from its reader. On the other hand, Tree MDI reads and displays GRML using a tree control. The tree control is the viewer of the Tree MDI web browser.

Tree MDI uses a reader, viewer, and writer. The writer reads GRML and writes (saves) GRML. A writer allows content in the viewer to be saved to a disk, hard drive, or web server. It does not matter whether the content in the viewer has been changed. Changing, or editing, content is another use.

When Tree MDI displays content, it allows it to be edited. Therefore, Tree MDI uses an editor. An editor requires a viewer and therefore a reader. However, without a writer, there is no way to save edited content. Since Tree MDI has a writer, it allows GRML content to be changed and saved. To save in another format is another use.

An adapter saves GRML in other formats. Or, it saves other formats using GRML. It requires a reader and a writer. Tree MDI has a reader and writes (saves) using GRML, CSV or character-delimited formats. For example, it is possible to use the Tree MDI web browser to read GRML, edit the content, and write (save) using the CSV or character-delimited format.

Conclusion.

There are five different ways to use GRML. There are writers, adapters, viewers, editors, and readers. To make it easier to remember, just use WAVER.

WAVER provides GRML web browsers different uses of GRML files and web pages. It also makes it possible to use other formats, such as CSV or character-delimited. With an explanation of how GRML is used by the web browser, it provides a basis for knowing what to use to accomplish a specific task using GRML.

Wednesday, October 13, 2004

Understanding GRML.

The development of a markup language.

Introduction

HTML is the primary markup language used on the web. After its first release, it lacked many of the features taken for granted today on the web. It took many years for HTML to become what it is. In fact, almost four years passed between the first attempts at a markup language and HTML 2.0. In the years since 1995, HTML has continued changing. This demonstrates the commitment necessary to develop a markup language.

Before the development of HTML began, it needed software to test its features. The software developed was the precursor to the first HTML web browser. There is no way to test a markup language without having the software first. This demonstrates the requirements for developing a markup language. The software drives its development.

The purpose of this article is to show how General Reuse Markup Language, or GRML, developed into its current format. Examples are given to show the differences between GRML 1.0 and GRML 2.0. The attributes of each markup language are described along with how they are used on the web.

Background

This is one in a series of articles on GRML. Before continuing, read the article, Introducing GRML. It provides an overview of existing file formats and markup languages, and explains why GRML was created.

If you are not interested in markup languages, potential alternative approaches, or web browser technology, this is not the article for you. This discussion is not suitable for anyone who feels HTML is the only way to browse the web.

The Beginning.

The process of creating GRML was indirect. It began with a desire to create a front-end to extract content from web pages. The idea was to submit a web page request and retrieve the content in a format usable by a variety of applications. HTML displays content in one way, so it is not used by a variety of applications. Since the target web pages used HTML, the retrieved content needed to be available using another format.

The only solution to extracting content from a HTML web page is to use an adapter. Adapters read data in one format and write them in another. This was the perfect solution, except for one thing. HTML web pages are described differently for every web page requested. There is no way to extract author information, or article text, or product descriptions without creating an adapter for each web page. There had to be a better way.

Building a web front-end.

While trying to find a practical way to extract content from web pages, a front-end was being developed to display the content. A single adapter was developed to format HTML from a single web page into an informal format used by the front-end. This informal format was the initial step toward creating a markup language.

From June, 2002 until August, 2002, the front-end used an adapter to convert HTML web pages to text, for display. There was no format, other than reading single lines of text from the adapter. As development continued, more adapters were added, until 6 were available. Web page requests sent from the front-end had to use one of these 6 adapters. There was no feature for users to directly enter a web page request.

The first attempt.

As the front-end was developed, a form was needed for sending requests using input controls. This required a formal approach for handling requests to and responses from a web page. Using arbitrary lines of text was inefficient. This was the beginning of Personal Markup Language.

The new markup language had form support and provided a structure for formatting web page content. However, the form was limited. At first, the front-end created a form from the first web page request. There was no way to display another form. To allow the markup language to create a form for each web page request, the front-end was updated.

Upgrading the format.

With form support, the front-end now sent web page requests from input controls and created a form from web page responses, when necessary. The only feature missing was a way to organize web page content into groups, and display each group of content separately in the front-end. This required a new markup language. It was the beginning of the Simple Markup Language.

When the front-end displays content from a web page, it is called a dimension. Splitting content into different groups creates a dimension for each group. The front-end needed to display different dimensions of content for forecasting, logistics, and data analysis. Once the front-end added this, the markup language supported multidimensional views.

As the markup language was being developed, there was one constant. The front-end did not allow the user to directly enter a web page request. A user had to choose from the 6 web page requests used by the front-end. Or, submit a request using the form input controls of a web page.

Once direct web page requests were added, it was possible to "browse" web pages. The front-end became a web browser. Using a web browser required the markup language to be completely redesigned. This new markup langauge was the first version of GRML.

GRML 1.0.

Completed January 2003, GRML supported form input controls, columns, and results. There was multidimensional support and it used the concept of "web applications". Each represented an activity that a user performs on the web. The first GRML web browser had "web applications" for using a search engine, getting news headlines, viewing auction listings, and doing a job search.

"Web applications" were a holdover from the days of the front-end, when directly submitting a web page request or opening a file were not supported. While the web browser allowed web page requests, they had to be from a "web application" or a form if the request was to be sent.

The reason for "web applications" is to use content from HTML web pages in GRML web browsers. Since HTML web pages are abundant and GRML is new, it is advantageous to have the ability to adapt HTML to GRML.

An example of "web applications" in GRML 1.0 is below.

<GRML>
<a class=navi_13 name=AUCT type=title>Auctions</>
<a class=navi_13 name=JOBS type=title>Job Search</>
<a class=navi_13 name=SRCH type=title>Search Engine</>
<a class=navi_13 name=AUCT type=location>127.0.0.1/auc.asp?search2=</>
<a class=navi_13 name=JOBS type=location>127.0.0.1/jobs.asp?search2=</>
<a class=navi_13 name=SRCH type=location>127.0.0.1/parse.asp?search2=</>

<a class=hist_13 type=item>127.0.0.1/startup.asp</>
<a class=hist_13 type=item>127.0.0.1/over.asp</>
</GRML>

GRML was designed to be used by many different browsers. It was not possible to test this capability since only one GRML web browser existed. As other browsers were created and the markup language developed, GRML moved to version 1.1 in the first 4 months of 2003.

The next major upgrade to GRML occurred when resolving the problem of "web applications."

GRML 1.2.

One limitation of the "web application" approach was the need for a separate adapter for each HTML web page. Since there are billions of HTML web pages, it was impractical to create a "web application" for each one. Another problem was keeping the "web application" updated if a web page changed. If supporting a multitude of web pages is difficult, trying to keep them updated was practically impossible. GRML needed modification.

During March, 2004, everything related to "web applications" was removed from GRML. This allowed the markup language to focus on form input controls, columns, and results. With the "web applications" removed, it was now possible to read any HTML web page using more generic and consistent web adapters.

An example of GRML 1.2 follows.

<GRML>
<a class=edit_13 name=url1 type=title>Enter URL:</>
<a class=edit_13 name=url1 type=location>http://127.0.0.1/links.asp</>

<a class=column_13 type=item>Title</>
<a class=column_13 type=item>Result</>

<a control=result_13 type=item>RIAA, MPAA Ask High Court To Review
<a control=result_13 type=item>It's official: Hollywood studios and record companies on Friday asked the United States Supreme Court to overturn a controversial series of recent court decisions that have kept file-swapping software legal."</>

<a control=result_13 type=link>http://127.0.0.1/article.pl?sid=04/10/11/1846208</>
</GRML>

GRML 1.2 was the last of the 1.x releases of GRML. During the next six months of use, it set the stage for another change in the syntax of the markup language.

GRML 2.0.

The inital versions of GRML worked well on the web and the local filesystem. It allowed the development of many different web browsers that use its form and column/result approach. Other than removing "web applications", the syntax for GRML did not change much from the 1.0 to 1.2 versions. Issues of speed, control, and reliability were not considered. However, this changed with GRML 2.0.

This version of GRML was designed to create small file sizes, handle file and web page content using fewer browser resources, and allow more options for arranging file and web page content. The old syntax was completely abandoned in favor of smaller tags and more specific tag keywords. The sample GRML from version 1.2 looks as follows in 2.0.

<GRML>
<edit url1>
<location>Enter URL:
<title>http://127.0.0.1/links.asp
</edit>

<column>
<Title>
<Description>
<Link>
</column>

<result>
<Title>RIAA, MPAA Ask High Court To Review

<Description>The Hobo writes "It's official: Hollywood studios and record companies on Friday asked the United States Supreme Court to overturn a controversial series of recent court decisions that have kept file-swapping software legal."

<link>http://127.0.0.1/article.pl?sid=04/10/11/1846208
</result>
</GRML>

Using the GRML 2.0 syntax, tags drop to a fraction of their size from version 1.2. In addition, there are no problems with handling very large text strings (greater than 1024 characters). In version 1.2, the content sometimes was ignored because of its size. This often disrupted the display of all remaining content in the file or web page. This problem was solved in version 2.0, because each result item specifies a column.

It is possible to organize columns and results using version 2.0 that is not possible with version 1.2. Results are ordered according to the column display order. This is set by listing the top column as first, and all subsequent columns in order until the bottom column is last. If there are 5 columns, and the 3rd should be displayed first, place it at the top of the column order.

A result item only displays if the column it specifies appears in the column order. If it is necessary to display only one column of results, only that column exists in the column order. Or, specify any number of columns and only those results are displayed. This was not possible with previous versions of GRML.

Conclusion.

GRML has moved through many versions since its first release, January 2003. It has moved from a "web application" markup language to a web page markup language. With version 2.0, it has the smallest, fastest, and most flexible syntax of any version released.

With its support for form input controls, columns, and results, GRML is able to support many web browsers by organizing its content for use regardless of how the content is displayed.

Learn more about GRML and GRML web browsers.

Wednesday, October 06, 2004

Building GRML web browsers

Over the past month, 3 GRML web browsers were released. Each supports CSV or character-delimited formats.

October 4, 2004 - Headlines MDI GRML web browser description.

September 29, 2004 - Bar Graph MDI GRML web browser description.

September 20, 2004 - Tree MDI GRML web browser description.

A bug was found in Bar Graph MDI. It was fixed on October 5. I also kept calling it Bar Chart MDI. So, a number of download sites have the wrong name.