Re: Readable regexs

Yes, Dimitre, if you access a stylesheet using document(), you can get at things such as whitespace outside <xsl:text>, non-XSLT elements at the top level of the stylesheet, and, indeed, comments. If you access a stylesheet using unparsed-text(''), you can even get at serialisation details such as whether double or single quotes have been used around attribute values, and precisely how much whitespace has been used within a tag.

But when the document is loaded and compiled as a stylesheet, these things are ignored. The value of the $UKDate variable doesn’t include the comments, or less-than-signs, or any other indication that there were comments in the stylesheet.

Reply

The content of this field is kept private and will not be shown publicly.