error: only one item as 1st arg of matches()

Help
2011-01-06
2012-10-08
  • I'm working on scraping HTML pages and transforming the selected content from
    them into XML and I've been seeing a few errors here and there thrown by
    Saxon. The project uses a Ruby wrapper to work with some pre-existing Java
    code, including Saxon, to do all of this, as well as processing RSS feeds.
    There are several Ruby plugins we've created and one is called the
    SaxonTranslator, so that's why you see that as part of the error messages.
    The error:

    WARN (SaxonTranslator#745077) improper java log: XPTY0004: A sequence of more
    than one item is not allowed as the first argument of
    WARN (SaxonTranslator#745077) improper java log: matches() ("<!--
    google_ad_client = "ca-...", "", ...)
    ERROR (SaxonTranslator#745077) error while processing file
    '5b1b6858d9aac9c885dfa5cb1f3152ad.substituted': Saxon error...A sequence of
    more than one item is not allowed as the first argument of matches() ("<!--
    google_ad_client = "ca-...", "", ...)
    (~/sandbox/midpoint/core_plugins/plugins/JavaPlugin.rb:131:in `execute')

    The same with type of error with ("<!--//<![CDATA[ var m...", "<!--//<![CDATA[
    va...", ...)

    Also one with ("...", "", ...)

    I'm looking into Saxon now, but I am not good at Java. I was hoping someone
    could shed some light on the matter and maybe just help me understand the
    nature of the errors.

    Thanks in advance.

     
  • Michael Kay
    Michael Kay
    2011-01-06

    You asked the same question on the saxon-help mailing list, and I have
    answered it there. For reference, please see the mailing list archive at http
    ://saxon-help.markmail.org/