Re: [xsl] Problem with embeded XHTML in an XML file and transformation to XSL:FO

Subject: Re: [xsl] Problem with embeded XHTML in an XML file and transformation to XSL:FO
From: Florent Georges <darkman_spam@xxxxxxxx>
Date: Sun, 13 Aug 2006 15:12:27 +0200 (CEST)
andrew welch wrote:

  Hi

> Yes - add it to your <xsl:stylesheet> or <xsl:transform> elements...
> not at the template level...

  I can't test that here, and the documentation of saxon:parse()
doesn't say anything about namespaces.  But are you sure saxon:parse()
take into account the namespace bindings in the context of the
*expression*?

  It can be usefull when you pass string literals (but I'm not sure it
is usefull).  But when using a text node, I think it is not logical to
use the namespaces in the stylesheet and not those in the document the
text node belongs to.  Compare for example:

    <!-- The document. -->
    <root xmlns:ns="doc">&_lt;ns:elem/></root>

    <!-- Somewhere in the stylesheet. -->
    <xsl:copy-of xmlns:ns="script" select="saxon:first(root)"/>

  What do you expect as the output?

    <ns:elem xmlns:ns="doc"/>

or:

    <ns:elem xmlns:ns="script"/>

  But as the argument of saxon:parse() is a string, not a text node,
the only solution I see is to have a string namespace-well-formed:

    <root>&_lt;ns:elem xmlns:ns="doc"/></root>

  Regards,

--drkm





















	
 p5.vert.ukl.yahoo.com uncompressed/chunked Sun Aug 13 12:13:40 GMT 2006 
	
		
___________________________________________________________________________ 
Dicouvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet ! 
Yahoo! Questions/Riponses pour partager vos connaissances, vos opinions et vos expiriences. 
http://fr.answers.yahoo.com 

Current Thread