1

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?

kjhughes
  • 106,133
  • 27
  • 181
  • 240
Ben ZERBIB
  • 25
  • 3

2 Answers2

1

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())
                                                                           ^
kjhughes
  • 106,133
  • 27
  • 181
  • 240
0

It may be a cut-and-paste problem, but those delimiters around ‘LifeID3 Service’ are not apostrophes, they are typographical quotation marks.

Michael Kay
  • 156,231
  • 11
  • 92
  • 164