No, there's no way to influence the way such elements are handled (other that in a filter applied to the stylesheet on its way into the system, of course). You don't really explain what you want to do with such elements, you only say that you don't want them to be ignored. Could you explain what you would like to achieve?
 
Michael Kay
http://www.saxonica.com/


From: saxon-help-bounces@lists.sourceforge.net [mailto:saxon-help-bounces@lists.sourceforge.net] On Behalf Of Netta Doron
Sent: 18 October 2007 17:34
To: saxon-help@lists.sourceforge.net
Subject: [saxon] XSLT extension non-instruction

Is there a way to write an XSLT extension non-instruction i.e. an element that will not be ignored outside a template block?

eg:

<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:lh="java:/saxonPlugin.ExtractorElementFactory"
xmlns:saxon="http://saxon.sf.net/"
extension-element-prefixes="saxon lh">

<lh:namespaces-to-pass-through ns="http:\\www.LightHtmlExtractors.com/wc/ns1"/>

<xsl:template match="/">
  <my-object>
    <xsl:apply-templates select="node()"/>
  </my-object>
</xsl:template>

<xsl:template match="extract">
<lh:to-lhtml select="markup"/>
</xsl:template>

</xsl:stylesheet>

I would like for "<lh:namespaces-to-pass-through ns="http:\\www.LightHtmlExtractors.com/wc/ns1"/>" not to be skipped as an element.

-Netta