Mark Wilson I am the creator of TopXML. I am available for international and local (Australia) contracts. I am a Solution Architect/Business Analyst. I have worked in IT in several countries (NZ, Australia, South Africa, UK) building and training teams for government and very large non-governmental organizations. I am ex-Microsoft Consulting Services. I wrote the first book on Microsoft XML published in 2000 called XML Programming with VB and ASP. Most recently I have been building tools for the SEO industry. Ask me for a 37 point SEO health-checkup for your website.
Example: Creating an HTML document with 'previous' and 'next' links
Creating HTML links in a document that is generated from XML: a recurring task. At best, we would like to
have a maintainable way to create links in the result document. Especially internal links (where both
the link and the links target are generated from the same source) can be tedious to maintain manually.
If you set things up as swonw in this sample, both the links and the anchors (the <a name=""> tag)
are created using the same code. This guarantees that internal links are always correct.
The last 5 templates in this stylesheet could be used as an import stylesheet in other transformations.
The logic has been split up in multiple templates: by doing this, we can import the templates and
override one of them to create a slightly different linking behavior (i.e. change only the way to
generate a unique identifier to another algorithm).
In this source document, the id attributes are all unique strings, which makes them suitable for use
as anchor. The only problem is that they contain spaces and possibly also pound signs (#). These
characters are not allowed in the anchor name, so we use the translate function to change all
spaces and #'s to underscores (_). Because this template is used for both creating the links and
creating the anchors, we can't go wrong!
text text text
text text text text text
text text text text text text text text text
text text text text text
text text text text text
text text text text text
text text text text text
text text text text text
text text text text text
text text text text text
text text text text text
text text text text text
text text text text text
text text text text text
text text text text text
Note: You can now download the full content of the XPath reference, the XSLT reference and the
DOM reference in one PDF document. This document contains the implementation tables, internal
links to navigate through the references, a full linked table of contents. You can use free text
search through the whole reference or print as a nicely formatted document.
Download here...