& / & test case

This test takes one xml containing an sane URL and transforms it to both xml and html. The URL contains the & character and are printed out inside an p element and on an href attribute on the a element.

If everything is OK the & character SHOULD be expressed with its entity in both the p element and in the href attribute. This SHALL be the case on both transformations (both XML and HTML).

What might happen is that on the HTML transformation the & character are not represented with its entity in the href attribute. Which results in unvalid HTML.

Please view source to see the differences.


No xslt transformation:

The link is: http://www.trygve-lie.com/?foo=a&bar=b
Click here to see it!


XSL transformation to XML:

The link is: http://www.trygve-lie.com/?foo=a&bar=b
Click here to see it!


XSL transformation to HTML:

The link is: http://www.trygve-lie.com/?foo=a&bar=b
Click here to see it!