OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   [xpattern] Stream Order Operator

[ Lists Home | Date Index | Thread Index ]
  • To: xml-dev@lists.xml.org
  • Subject: [xpattern] Stream Order Operator
  • From: Alan Gutierrez <alan-xml-dev@engrm.com>
  • Date: Wed, 19 Jan 2005 00:02:07 -0500
  • Mail-followup-to: xml-dev@lists.xml.org
  • User-agent: Mutt/1.4.1i


    XPath notion is a path language. It expresses paths in a
    document.  I'd like to have a stream langauge.
    
    There is one obvious path in XPattern, analgous to the ancestor
    axis, but that's it. Anything more and you're delving into the
    wrong vocabulary.

    Path into the tree.

    /a/b/c

    Then you need something to indicate the order in the stream, I
    suggest using the comma.
    
    /a/b(foo, bar, baz)/c

    /a(b/foo, b)/c

    Then you can have proper pattern matching operators.

    /a(b/foo+, b*)/c

    Wonding if this collides with addition and multiplication.
    Wondering if addition and multiplication have a place in XPattern.

    I'm wondering if the path sepearator, although obvious, ought to
    be replaced by something that the language won't be confused
    with XPath.
    
    Caret maybe to match start and dollar sign to match end?

    ^a(b^foo, c+)^c

    Coming back to capturing.

    /a(<b>, c = $1)

    Also, when does the pattern match?

    /a(b = 1)

    <a>
      <b>1</b>
 <!--     ^ We known where at end element. -->
      <b>2</b>
    </a>

    This wouldn't match.

    /a(b = 1)/b

    <a>
      <b>1</b>
 <!--     ^ Have the match, but the start element has passed. -->
      <b>2</b>
    </a>

    <a>
      <b>1</b>
      <b>2</b>
 <!-- ^ You must want this instead. -->
    </a>

    Cheers.

--
Alan Gutierrez - alan@engrm.com




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS