[Home] [By Thread] [By Date] [Recent Entries]
I guess the following section answers this. "A subtraction operator must be preceded by whitespace if it could otherwise be interpreted as part of the previous token. For example, a-b will be interpreted as a name, but a - b and a -b will be interpreted as arithmetic expressions. (See A.2.4 Whitespace Rules for further details on whitespace handling.)" On Sat, Jun 20, 2009 at 12:44 AM, Ramkumar Menon<ramkumar.menon@g...> wrote: > Spec lists the following as reserved fn names. > > attribute,comment,document-node,element,empty-sequence,if,item,node,processing-instruction,schema-attribute,schema-element,text,typeswitch > > Does this mean that user can register other "unprefixed" xpath > functions [custom ones]. > > If No, okay. > If yes, quick, but naive Q. > What if user defined an unprefixed function named instruction(), or a > function named sequence()? > Lets say instruction() and sequence() functions return numerical values. > What would happen if the user performed the xpath on the following doc. > > <numberOfTasks> > Â <processing>20</processing> > Â ... > Â Â <empty>1</empty> > </numberOfTasks> > > xslt > ------- > <xsl:template match="numberOfTasks"> > Â Â <netValue><xsl:value-of select="processing-instruction()"/></netValue> > Â Â <someValue><xsl:value-of select="empty-sequence()"/></someValue> > </xsl:template> > Whats the behaviour? > Should this be explicitly disallowed? > > I'll close my eyes and wait :-) Someone's gonna use a sledgehammer on me :-) > > Ram > -- Shift to the left, shift to the right! Pop up, push down, byte, byte, byte! -Ramkumar Menon A typical Macroprocessor
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |

Cart



