Re: [xslt] indentation problem and some related questions




On Nov 15, 2008, at 11:37 AM, Viktor Štujber wrote:

But, I would bet the problem is your XHTML document is in the XHTML namespace. You need to declare it (in your root xsl:styleshseet elem, most likely)
The stylesheet already has a default namespace (xhtml's). The xml data
also has a default namespace (also xhtml's). You mean that there's a
collision between the two and I need to attach an explicit namespace
(which is identical to the default one) to make it work?

yes. You can define one as the default and then one with a namespace prefix


(example I've used is attached to this e-mail)

No, xsl:copy-of will copy everything.
So your solution manually copies the topmost elements

No it matches all elements (no matter where in the hierarchy) and creates a new element and places it in the XHTML namespace.

(which exhibit
the problem) without their namespaces, and then run xsl:copy-of on the
rest?

No, my example only copies the attributes and text nodes. It applies templates through out the hierarchy


That sounds doable. I'm also thinking of wrapping the data in a
<div> so that there'll only be one element to process instead of a
whole lot.

I don't understand.

-Rob


<test.zip>_______________________________________________
xslt mailing list, project page http://xmlsoft.org/XSLT/
xslt gnome org
http://mail.gnome.org/mailman/listinfo/xslt



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]