[Home] [By Thread] [By Date] [Recent Entries]
Michael Kay wrote:
OK, thanks again.Stand by; can a document node ever, every contain text nodes? Just a yes / no one: I understand (correctly???) that I can do <xsl:variable name="x" as="schema-element(a)"> <xsl:apply-templates select="//foo"/> </xsl:variable> The question is, what happens if I run that on a schema-aware processor, and the <apply-templates.../> evalutates to something which is not a valid a element? I see something about function conversion rules .. but I'm in doubt what will happen here. The basic question behind this is from may static analysis: If I statically know the schema declaration of element a (and all its declared descendants), and I see a variable binding elenet / a stylesheet function declaration with as=schema-element(a) (give or tak an OccurenceIndicator), can I assume that the variable at run-time is really bound to a valid a? And will its descendants be valid, too? If YES, then I will have a really easy time of statically simulating a <copy-of select="$x"/> -- it's a valid a. My understanding so far is NO. Soren
|

Cart



