Re: Generating a string containing '

Brian Chrisman <[email protected]> Thu, 26 May 2005 15:55:06 -0700
Newsgroups gmane.text.xml.o-xml
Message-ID <[email protected]>
On Thu, May 26, 2005 at 10:16:37PM +0000, Ken McCloskey wrote:
> I don't seem to be able to create a string in OXML containing a single 
> quote.
> 
> <o:param name="list" select="''one','two''/> obviously doesn't work, but 
> there seems to be no means by which to escape the ' so that it will not 
> cause the parser to do this:

Do you mean:
<o:param name="list" select="''one','two''"/> 

rather than:
<o:param name="list" select="''one','two''/> 

the latter is well-formed XML and should parse.

-Brian

> 
> org.oXML.xpath.parser.ParserException: invalid expression: null
> 	org.oXML.xpath.parser.GeneratedParser.report_fatal_error(GeneratedParser.java:661)
> 	java_cup.runtime.lr_parser.unrecovered_syntax_error(lr_parser.java:409)
> 	java_cup.runtime.lr_parser.parse(lr_parser.java:601)
> 	org.oXML.xpath.parser.GeneratedParser.parse(GeneratedParser.java:649)
> 	org.oXML.xpath.parser.ExpressionParser.parse(ExpressionParser.java:23)
> 
> It would be nice to be able to double the single quote:
> 
> <o:param name="list" select="'''one'',''two'''/>
> 
> Can the jcup grammar be changed? I'm not familiar enough with jcup to be 
> able to do this myself.
> 
> Ken
> 
> 
> _______________________________________________
> o-xml mailing list
> o-xml-zRfLyl9bSvv/[email protected]
> http://lists.pingdynasty.com/mailman/listinfo/o-xml