|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XPath is a composable language ... does that mean I ca
Hi Folks,
I have this English sentence:
if the machine = "Intel 386 or later processors and compatible processors"
then ... else ... .
I deliberately elided the then-clause and the else-clause.
I need to turn that English sentence into XPath. I created this XPath:
if (/Windows_Executable_File/Headers/File_Header/Machine = "Intel 386 or later
processors and compatible processors")
then
...
else
...
Next, I created an XPath expression for the then-clause. I created the XPath
independent of its enveloping if-then-else. Let me denote the XPath expression
I created as: then-clause-XPath.
I did the same for the else-clause.
I then plugged then-clause-XPath and else-clause-XPath into the if-then-else:
if (/Windows_Executable_File/Headers/File_Header/Machine = "Intel 386 or later
processors and compatible processors")
then
then-clause-XPath
else
else-clause-XPath
The XPath 3.0 specification says this:
XPath 3.0 is a composable language
Does "composable language" mean I can do as I describe above and the result
will be a valid XPath expression?
That is, can I develop an XPath expression for the then-clause completely
independent of its enveloping if-then-else and then simply plug the XPath into
the if-then-else? Ditto for the else-clause? Does "composable language" mean I
can do this kind of thing?
/Roger
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








