xslt - Can an XSL template match in *ALL* modes? -


Is there a way to write an XSL 1.0 template that matches in all modes?

Or do I have to write a different template for every existing mode (including templates in addition to future modes)?

What do I have here:

  & lt; Xsl: applied-template mode = "mode1" /> ... & lt; Xsl: applied-template mode = "mode 2" /> ... & lt ;! - Do not process any of the nodes' text content, in spite of what - & gt; & Lt ;! - Is there just a template here? - & gt; & Lt; Xsl: template match = "text ()" mode = "mode1" /> & Lt; Xsl: template match = "text ()" mode = "mode2" />  

Predefined mode: (though only available in XSLT 2.0).

Edit: Replacing shared mode behavior with 1.0

   & Lt ;! - Input seed here - & gt; & Lt; XSL: Select & gt; & Lt; Xsl: when test = "$ choice = 'a'" & gt; & Lt; Xsl: applied-template mode = "a" /> & Lt; / XSL: When & gt; & Lt; Xsl: when test = "$ choice = 'b'" & gt; & Lt; Xsl: applied-template mode = "b" /> & Lt; / XSL: When & gt; & Lt; / XSL: Select & gt; & Lt; / XSL: Templates & gt; & Lt; Xsl: template match = "*" mode = "a" & gt; [A] & lt; Xsl: apply-template / & gt; & Lt; / XSL: Templates & gt; & Lt; Xsl: template match = "*" mode = "b" & gt; [B] & lt; Xsl: applied-template / & gt; & Lt; / XSL: Templates & gt; & Lt; Xsl: template match = "text ()" & gt; [ALL] & lt; / Xsl: Templates & gt;  

Comments