Hi
I have the following xsl stmt.
<xsl:for-each select="JOB_POSTINGS/JOB_POSTING
[(
(CITY='Atlanta' and STATE='GA')
)]\">
<xsl:sort select="JOB_TITLE" order="ascending"/>
This works fine when I use it.
But when using multiple values in the where clause as below
<xsl:for-each select="JOB_POSTINGS/JOB_POSTING
[(
(CITY='Arlington' and STATE='VA') ||
(CITY='Atlanta' and STATE='GA')
)]\">
<xsl:sort select="JOB_TITLE" order="ascending"/>
I get an error message. Anyone pl. tell how i need to do this, if I am
doing something completely wrong?
Thanks very much..
-laks..
[XPathException: The expression passed to this method should result in
a NodeSet.]
System.Xml.XPath.XPathParser.ParseNodeTest(AstNode qyInput, AxisType
axisType, XPathNodeType nodeType) +834
System.Xml.XPath.XPathParser.ParseStep(AstNode qyInput) +207
System.Xml.XPath.XPathParser.ParseRelativeLocationPath(AstNode
qyInput) +12
System.Xml.XPath.XPathParser.ParseLocationPath(AstNode qyInput) +157
System.Xml.XPath.XPathParser.ParsePathExpr(AstNode qyInput) +140
System.Xml.XPath.XPathParser.ParseUnionExpr(AstNode qyInput) +65
System.Xml.XPath.XPathParser.ParseUnaryExpr(AstNode qyInput) +81
System.Xml.XPath.XPathParser.ParseMultiplicativeExpr(AstNode
qyInput) +22
System.Xml.XPath.XPathParser.ParseAdditiveExpr(AstNode qyInput) +22
System.Xml.XPath.XPathParser.ParseRelationalExpr(AstNode qyInput)
+22
System.Xml.XPath.XPathParser.ParseEqualityExpr(AstNode qyInput) +22
System.Xml.XPath.XPathParser.ParseAndExpr(AstNode qyInput) +17
System.Xml.XPath.XPathParser.ParseOrExpr(AstNode qyInput) +17
System.Xml.XPath.XPathParser.ParsePrimaryExpr(AstNode qyInput) +415
System.Xml.XPath.XPathParser.ParseFilterExpr(AstNode qyInput) +16
System.Xml.XPath.XPathParser.ParsePathExpr(AstNode qyInput) +32
System.Xml.XPath.XPathParser.ParseUnionExpr(AstNode qyInput) +22
System.Xml.XPath.XPathParser.ParseUnaryExpr(AstNode qyInput) +81
System.Xml.XPath.XPathParser.ParseMultiplicativeExpr(AstNode
qyInput) +22
System.Xml.XPath.XPathParser.ParseAdditiveExpr(AstNode qyInput) +22
System.Xml.XPath.XPathParser.ParseRelationalExpr(AstNode qyInput)
+22
System.Xml.XPath.XPathParser.ParseEqualityExpr(AstNode qyInput) +22
System.Xml.XPath.XPathParser.ParseAndExpr(AstNode qyInput) +17
System.Xml.XPath.XPathParser.ParseOrExpr(AstNode qyInput) +17
System.Xml.XPath.XPathParser.ParseStep(AstNode qyInput) +404
System.Xml.XPath.XPathParser.ParseRelativeLocationPath(AstNode
qyInput) +12
System.Xml.XPath.XPathParser.ParseRelativeLocationPath(AstNode
qyInput) +106
System.Xml.XPath.XPathParser.ParseLocationPath(AstNode qyInput) +157
System.Xml.XPath.XPathParser.ParsePathExpr(AstNode qyInput) +140
System.Xml.XPath.XPathParser.ParseUnionExpr(AstNode qyInput) +22
System.Xml.XPath.XPathParser.ParseUnaryExpr(AstNode qyInput) +81
System.Xml.XPath.XPathParser.ParseMultiplicativeExpr(AstNode
qyInput) +22
System.Xml.XPath.XPathParser.ParseAdditiveExpr(AstNode qyInput) +22
System.Xml.XPath.XPathParser.ParseRelationalExpr(AstNode qyInput)
+22
System.Xml.XPath.XPathParser.ParseEqualityExpr(AstNode qyInput) +22
System.Xml.XPath.XPathParser.ParseAndExpr(AstNode qyInput) +17
System.Xml.XPath.XPathParser.ParseOrExpr(AstNode qyInput) +17
System.Xml.XPath.XPathParser.ParseXPathExpresion(String
xpathExpresion) +55
System.Xml.Xsl.Compiler.AddQuery(String xpathQuery, Boolean
allowVar, Boolean allowKey) +64
[XsltException: 'JOB_POSTINGS/JOB_POSTING[((CITY='Arlington' and
STATE='VA') ||(CITY='Atlanta' and STATE='GA') ) ]' is an invalid XPath
expression.]
System.Xml.Xsl.Compiler.AddQuery(String xpathQuery, Boolean
allowVar, Boolean allowKey) +296
System.Xml.Xsl.ForEachAction.CompileAttribute(Compiler compiler) +77
System.Xml.Xsl.CompiledAction.CompileAttributes(Compiler compiler)
+193
System.Xml.Xsl.ForEachAction.Compile(Compiler compiler) +16
System.Xml.Xsl.Compiler.CreateForEachAction() +38
System.Xml.Xsl.ContainerAction.CompileInstruction(Compiler compiler)
+378
System.Xml.Xsl.ContainerAction.CompileOnceTemplate(Compiler
compiler) +78
System.Xml.Xsl.ContainerAction.CompileTemplate(Compiler compiler)
+15
System.Xml.Xsl.TemplateAction.Compile(Compiler compiler) +155
System.Xml.Xsl.Compiler.CreateTemplateAction() +52
System.Xml.Xsl.ContainerAction.CompileTopLevelElements(Compiler
compiler) +758
System.Xml.Xsl.ContainerAction.CompileDocument(Compiler compiler,
Boolean inInclude) +175
System.Xml.Xsl.RootAction.Compile(Compiler compiler) +7
System.Xml.Xsl.Compiler.CreateRootAction() +128
System.Xml.Xsl.Compiler.Compile(NavigatorInput input, XmlResolver
xmlResolver, Evidence evidence) +204
[XsltCompileException: (1,132) :
]
System.Xml.Xsl.Compiler.Compile(NavigatorInput input, XmlResolver
xmlResolver, Evidence evidence) +296
System.Xml.Xsl.XslTransform.Compile(XPathNavigator stylesheet,
XmlResolver resolver, Evidence evidence) +215
System.Xml.Xsl.XslTransform.Load(XPathNavigator stylesheet,
XmlResolver resolver, Evidence evidence) +123
System.Xml.Xsl.XslTransform.Load(XmlReader stylesheet, XmlResolver
resolver, Evidence evidence) +74
cbre.Templates.Corporate.General.JobSearch.btnSubmit(Object sender,
ImageClickEventArgs e) in
c:\websites\cbrecms\cbrecom\cbre\templates\corporate\general\jobsearch.aspx.cs:428
System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e)
+109
System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +69
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+33
System.Web.UI.Page.ProcessRequestMain() +1292