Loading ...
Sorry, an error occurred while loading the content.

XMLSubsMatch multiple namespaces

Expand Messages
  • Kulp, David
    First, I just want to say that I am very very impressed with Apache::ASP. I just want to gush with praise after looking at many other implementations of perl
    Message 1 of 2 , Jan 23, 2002
    • 0 Attachment
      First, I just want to say that I am very very impressed with Apache::ASP. I
      just want to gush with praise after looking at many other implementations of
      perl embedded code and being very underwhelmed. This is so damn slick and
      clean. Kudos!

      Now for my question: I'd like Apache::ASP (version 2.29) to respond to
      multiple namespaces, but the regex doesn't seem to work.

      If I do this:

      PerlSetVar XMLSubsMatch (dbb|ccc):\w+

      then 'ccc' tags get matched. If I do:

      PerlSetVar XMLSubsMatch (ccc|dbb):\w+

      then only 'dbb' tags get matched. Thinking that it might be the parens that
      are capturing the matched string and screwing up the ASP code, I tried the
      extended perl regex:

      PerlSetVar XMLSubsMatch (?:ccc|dbb):\w+

      But then neither tag matches.

      The only thing that works is

      PerlSetVar XMLSubsMatch [cd][cb][cb]:\w+

      This is truly wierd. Anyone know what's going on? It would be nice to
      write a regex with a little better readability.

      -d


      ---------------------------------------------------------------------
      To unsubscribe, e-mail: asp-unsubscribe@...
      For additional commands, e-mail: asp-help@...
    • Joshua Chamas
      ... If you ever get a site going, I d be happy to list that & these kudos under the testimonials section at http://www.apache-asp.org/sites.html Thanks for the
      Message 2 of 2 , Jan 27, 2002
      • 0 Attachment
        "Kulp, David" wrote:
        >
        > First, I just want to say that I am very very impressed with Apache::ASP. I
        > just want to gush with praise after looking at many other implementations of
        > perl embedded code and being very underwhelmed. This is so damn slick and
        > clean. Kudos!
        >

        If you ever get a site going, I'd be happy to list that & these kudos
        under the testimonials section at http://www.apache-asp.org/sites.html
        Thanks for the positive feedback!

        > Now for my question: I'd like Apache::ASP (version 2.29) to respond to
        > multiple namespaces, but the regex doesn't seem to work.
        >
        > If I do this:
        >
        > PerlSetVar XMLSubsMatch (dbb|ccc):\w+
        >
        > then 'ccc' tags get matched. If I do:
        >
        > PerlSetVar XMLSubsMatch (ccc|dbb):\w+
        >

        () messed up the creation of variables like $1, $2, etc
        in the parser regexp that used the XMLSubsMatch, so when this
        first came up, my solution was to simply remove () from
        XMLSubsMatch. A better solution seems like it would be
        conversion of (pattern) to (?:pattern) which does not seem
        to have the side effect of $1,$2... creation.

        I can do this for 2.33, but will not have this ready for a bit.

        For now, I would do this:

        PerlSetVar XMLSubsMatch ccc:\w+|dbb:\w+

        not beautiful, but it will work.

        --Josh

        _________________________________________________________________
        Joshua Chamas Chamas Enterprises Inc.
        NodeWorks Founder Huntington Beach, CA USA
        http://www.nodeworks.com 1-714-625-4051

        ---------------------------------------------------------------------
        To unsubscribe, e-mail: asp-unsubscribe@...
        For additional commands, e-mail: asp-help@...
      Your message has been successfully submitted and would be delivered to recipients shortly.