Re: Generating a string containing '
Martin Klang <[email protected]> Fri, 27 May 2005 00:11:45 +0100
| Newsgroups | gmane.text.xml.o-xml |
|---|---|
| Message-ID | <[email protected]> |
it's well-formed XML but the attribute value is not a valid o:XML expression. have you tried putting the string expression in double quotes and escaping the single quote, eg <o:param name="list" select='"one',two"'/> it would probably be better if the grammar supported doubling up of single quotes as an escape, but this should solve your immediate problem. otherwise there's always the option of using <o:text> blocks, or even: <o:variable name="txt">some text with "double" and 'single' quotes</o:variable> hth, /m On 26 May 2005, at 23:55, Brian Chrisman wrote: > 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(GeneratedPars >> er.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 > _______________________________________________ > o-xml mailing list > o-xml-zRfLyl9bSvv/[email protected] > http://lists.pingdynasty.com/mailman/listinfo/o-xml >