XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
q on xpath 2.0 reserved functions

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


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS