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

 


Help: OASIS Mailing Lists Help | MarkMail Help

cgmo-webcgm message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [cgmo-webcgm] ISSUE: regex APS addressing


At 04:29 PM 2/21/2008 -0500, Bezaire, Benoit wrote:
>[...]
>Actually this is task/test that should have been done in the 2.0 time
>frame.

Agreed.

>I think it would be good for the specification if this example
>were as slick as possible.

Agreed.  That said, the present regex code is going into the new appendix 
as is.  But it can and will be improved before the end.

Before 1st CD publication:  in-code comments and nice documentation header 
would be minimal.
Eventually:  code improvements.

("Eventually" can mean before end-of-May (for 2ndCD/CS), or after it goes 
to W3C WG, or ...)

>So if there's an API that's missing:
>WebCGMPicture::createNodeList() that would greatly ease the example, we
>should consider adding it to the 2.1 specification. Note: I came up with
>createNodeList(), I'm not saying it is needed, just an example.

Yes.  We are relying on the practitioners -- the DOM-application 
programmers and implementors -- to speak up and suggest such things.  Such 
as convenience methods that allow code to be cleaner and "slicker".

-Lofton.



>-----Original Message-----
>From: Galt, Stuart A [mailto:stuart.a.galt@boeing.com]
>Sent: Tuesday, February 19, 2008 11:52 AM
>To: cgmo-webcgm@lists.oasis-open.org
>Subject: RE: [cgmo-webcgm] ISSUE: regex APS addressing
>
>Hello all,
>
>I have attached an html that will open an arbitrary WebCGM and will
>allow you to select an attribute and enter a regular expression.  It
>will then produce a list of the application structures that match the
>regular expression.
>
>Please test this html using your favorite viewer and let me know (either
>to the list or privately) if it works correctly.  I would like to make
>sure that we have at least two implementations that will work when we
>get to that stage.
>
>I have tested this on my circuit, tic-tac-toe, and a couple of images
>used in the test suite.  If an attribute is unspecified it will show up
>in my
>
>list of nodes as  NODEID (myattribue="").  I make no effort to consider
>inheritance and only search on the specified values of attributes.
>
>One thing that should be noted is that when you enter a regular
>expression into the text field you must hit the submit button and not a
>carriage return.
>For some reason a carriage return will cause a reload of the HTML and
>you will need to select a CGM image again.
>
>I am probably misunderstanding how things should work but I was having
>lots of problems trying to create/manipulate a webCGMNodeList.  I went
>back to the simple cases in the test suite and they work, but all we do
>is a very simple add/delete test...
>
>It is not in the spec but I tried:
>var nl = new WebCGMNodeList();
>It of course does not work... Do we have a need to have a way to create
>an empty list?  If I am the only one to have tried this then the answer
>is probably no.
>
>I also tried:
>var nl = myFirstNode.toNodeList();
>This creates a WebCGMNodeList but if I remove item(0) to make it empty
>or when I try to append the first APS I found it will toss an exception.
>The
>spec says that if you try to append an item that is already in a
>WebCGMNodeList it will remove it from the current location and append it
>onto the end.
>This
>is not tested in the test suite..
>
>I finally got tired to trying to make WebCGMNodeList work the way I
>wanted to and just used a plain old vanilla javascript Array().  My
>original thought was that I would be able to get all of the APS in one
>call with something along the lines of:
>var allNodes = document.getElementsByTagName('*');
>This gives me all of the HTML nodes... and var allNodes =
>picture.getAppStructuresByName('*');
>doesn't work either.  So I "lifted" a bit of code to walk the WebCGM DOM
>
>tree and add the nodes to an array.
>
>Even though the HTML is 100+ lines long the real "code" that does the
>regex comparison is just a javascript match within the processAttr()
>function.
>
>
>
>--
>Stuart Galt
>SGML Resource Group
>stuart.a.galt@boeing.com
>(206) 544-3656
>
>
>---------------------------------------------------------------------
>To unsubscribe from this mail list, you must leave the OASIS TC that
>generates this mail.  You may a link to this group and all your TCs in OASIS
>at:
>https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]