Jesper Tverskov, November 12, 2009

www.xml please.com

Articles and tutorials about XML-technologies. Also a companion website for my XML training courses.

2009

Styling XML with CSS

All text books about XML have long chapters about how to style XML with CSS. This is misleading because it is used very little in the real world. It is fair to say that CSS for XML is only relevant as en exception to the rule. Students of XML should know that we can style XML with CSS but actually doing it is mostly a waste of time.

Name, NmToken, QName, NCName

Since there are restrictions on what can be used as a name for elements and attributes, the XML standards have come up with a host of "name" terms that are bound to confuse beginners in the subject. Name, NmToken, QName and NCName are also datatypes and XSLT/XPath and XQuery even have functions about some of them. Regular Expressions have \i and \c for initial character in Name and allowed characters in NmToken.

Google's Writely and XSLT for web pages

This article is written with Google's Writely and can at any time be edited by me at Google Docs. This XHTML webpage, on the other hand, is at my own website. It's a transformation of the page at Google Docs using XSLT. A script, called from my document at Google Docs, takes care of publication at my website.

xsl:namespace in XSLT 2.0

The xsl:namespace element is most often useful if namespaces are created dynamically or if they are part of content of elements and attributes as QNames, or if we for cosmetic reasons want to transfer namespace declarations from inner elements to outer element in output.

XHTML sections: implicit2explicit-hierarchy.xsl

How to unflatten XML often comes up in XSLT Help Fora like the xsl-list. In this tutorial I give a complete and detailed example of how to transform an XHTML document using h1-h6 headings into an explicit hierarchical structure of nested sections.

2008

Elements and functions available in XSLT processors

In XSLT we can use the functions element-available() and function-available() to see what instruction elements and functions are available including extensions. I have made an XSLT stylesheet testing the availability of all XSLT instruction elements, XSLT and XPath functions and Saxon and EXSLT extensions.

Attributes and XML namespaces

It is confusing for beginners in XML that the attributes of an element are not in a namespace if they don't have a proper namespace prefix. There is no default namespace for attributes. It is almost a rule that attributes are not in a namespace.

More: All Articles

Danish language

www.xmlkurser.dk

XML-kurser

På dansk i hele verden.

English language

www.xmltraining.net

XML-training

In English all over the world.

www.friendlytest.com

Friendly Tests

Test, training and quiz.