With a little work you could probably get code to associate each header name with its given column this is meaning that you impose upon the table by all rights the columns could in fact have no association with the column headers in this organization. Suppose however that you could create your own HTML to deal with this problem substituting purchase order for table line item and then labeling each element with the name of the property it contains. Comparing the HTML with POML (for Purchase order markup language) the difference that such a name change makes is dramatic. Just at a glance you can tell that a purchase order is comprised of line items which in turn include names codes unit costs and number of units. You can intuit the purpose of the table and a largely anonymous table suddenly becomes a very clear object model.
The purchase order Markup Language is of course actually an instance of XML and therein lies the irony. SGML has always had the data structuring capability but given the complexity of both the tools and the language itself using SGML as a data description language was simply not cost-effective. However by cutting out a significant part of the overhead that SGML represents, the whole notion that a document is simply one from a data structure quickly emerges. This realization didn’t bypass programmers. Most programming language have basic data structure that are built in to the language-linked, lists, vectors, collections- but these are for the most part linear structures. One structure in particular, the associative array does let you associate a label with a given entity in a list and if that entity itself as an associative array then you can build a structure similar to what XML offers. (And in some language XML parsers are built in precisely this manner.)
However wrapping your brain around XSL can take a little bit of work. XSL is built around the notion of templates. Each template provides a pattern to match and when an XML element matches the pattern the templates is run generating text that is added to a growing string of text. The XSL parser travels down the original XML document an element at a time opening up child elements before going to the next sibling element. Put another way XSL works recursively so that an XSL document can be remarkably compact compared to the more linear forms of procedural languages. Of course, XSL can also get considerably more cryptic for precisely the same reason. A Simple XSL script can convert the purchase order into a table for output as demonstrated by the example. The gist of preceding code can be seen by realizing that there are four templates. The first matching the top most element in the XSL structure. The second matching purchases order. The third designed to trap line items. The fourth writing out each of the line item properties. The apply templates statement essentially instructs the XSL parser to run any applicable templates against the children or other descendents of the current elements.
For more information to visit our website
web Development Company and
web developers or
web development services
Loading...