I wrote the following code in XML:
<# <Conditional Test= "(//Product_Name[text() = ‘LifeID3 Service’ and //Customer_Is_Paying_Maintenance/text())" /> #>
DisplayThisText
<# <EndConditional/> #>
Somehow I get the following error message:
(//Product_Name[text() = 'LifeID3 Service' and //Customer_Is_Paying_Maintenance/text())'
has an invalid token.
Could you please tell me where is the issue?
CodePudding user response:
An XML element name may not begin with #
, so <#
is not permitted in well-formed XML, so
I wrote the following code in XML:
<# <Conditional Test= "(//Product_Name[text() = ‘LifeID3 Service’ and //Customer_Is_Paying_Maintenance/text())" /> #>
is not correct — that's not XML.
However, if the <#
construct is particular to some (unspecified) application, perhaps you can proceed if you repair the syntax error in what appears to be an XPath with a predicate closed by )
rather than ]
:
... [text() = ‘LifeID3 Service’ and //Customer_Is_Paying_Maintenance/text())
^
CodePudding user response:
It may be a cut-and-paste problem, but those delimiters around ‘LifeID3 Service’ are not apostrophes, they are typographical quotation marks.