Re: fragment transformations

Martin Honnen <[email protected]> Wed, 03 Oct 2007 14:30:36 +0200
Newsgroups gmane.comp.mozilla.devel.layout.xslt
Organization Liberty Development
Message-ID <[email protected]>
Thomas Comiotto wrote:

> I have mozilla transforming a fragment obtained by 
> range.createContextualFragment() to some target format. It all works 
> very nice. Great! But only when I use lower case tag names in my xslt 
> selectors. I'm happy with that it works but wonder why..
> 
> Given a html tag soup that after being parsed serializes to a 
> well-formed something in null namespace with all upper case html tags: 
> why does the xslt transformer match lower case tag equivalents only?
> 
> 1. var str = "<p>a paragraph<p>next paragraph"
> 2. var fg = range.createContextualFragment(str)
> 3. serializeToString(fg) -> <P>a paragraph</P><P></P>
> 4. xsl:template match="P" -> no match, xsl:template match="p" -> match
> 
> Is this stuff documented somewhere? Or may I simply miss the point?

Where do you get the range object from? Is that an HTML document or an 
XML document?
And please also tell us which Mozilla version you are testing with.


-- 

	Martin Honnen
	http://JavaScript.FAQTs.com/