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

Re: [Clip] EMBED to OBJECT and EMBED

Expand Messages
  • Alec Burgess
    Hi Chris: I haven t looked closely at your regexp string - my eyes cross looking at all those {[a-zA-Z]+} s ;-( but I think its going to be almost
    Message 1 of 1 , Sep 9, 2005
    • 0 Attachment
      Hi Chris:

      I haven't looked closely at your regexp string - my eyes cross looking at
      all those "{[a-zA-Z]+}\"'s ;-(

      but I think its going to be almost impossible to construct a regexp which
      will handle arbitrary orders, not to mention that a single regexp won't
      match across multiple lines.

      If this is being done on HTML that you author/change/publish maybe you could
      have a series of regexp's in a single clip, one for each new order that you
      encounter?

      Otherwise, I think you have to attack it by selecting the entire <embed ....
      > (using ^!select HTMLTAG (?)), move it to a temporary buffer and fix it up
      attribute by attribute then replace the still selected source in the
      original by your fixed up version.

      Sounds ugly, but its probably easier to debug/alter after the fact too.


      Regards ... Alec
      --
      ; ( ) { } [ ] \ | 9 0 + = () {} []


      ---- Original Message ----
      From: "Chris Valentine" <orders@...>
      To: <ntb-clips@yahoogroups.com>
      Sent: Friday, September 09, 2005 10:09
      Subject: [gla: [Clip] EMBED to OBJECT and EMBED

      > I've managed to create a clip that can search for <EMBED>
      > tags in an
      > HTML file, copy the parameters, then replace it with an
      > <OBJECT> with <EMBED> inside.
      >
      > ^!Replace "<embed src=\"{[a-zA-Z0-9-_./^"]+}\"
      > width=\"{[0-9]+}\" height=\"{[0-9]+}\"
      > autoplay=\"{[a-zA-Z]+}\"
      > controller=\"{[a-zA-Z]+}\" {[a-zA-Z0-9-=_\"^>]*}>" >>
      > "\n<object
      > classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
      > codebase="http://www.apple.com/qtactivex/qtplugin.cab"
      > width="\2" height="\3">\n<param name="src"
      > value="\1">\n<param name="autoplay" value="\4">\n<param
      > name="controller" value="\5">\n<embed src="\1"
      > width="\2" height="\3" autoplay="\4"
      > controller="\5"></embed>\n</object>\n" RI
      >
      > What I'm wondering now is, what happens if the parameters
      > to the
      > original <EMBED> tag are in a different order? I know
      > that as it
      > stands, it won't actually find the existing tag, but is
      > there a way to
      > get it to ignore the order? In the situation I am using
      > it, it doesn't
      > matter since all the pages were created using GoLive 4
      > and the tags
      > are all contructed in exactly the same way, but with
      > other editors,
      > and with hand-crafted HTML, the parameter order could be
      > completely
      > different.
      >
      > BTW I should say that the HTML here is not necessarily
      > going to pass
      > any kind of validation!
      >
      > Chris.
      >
      >
      >
      >
      > ------------------------ Yahoo! Groups Sponsor
      >
      > Fookes Software: http://www.fookes.us,
      > http://www.fookes.com
      > Fookes Software Mailing Lists:
      > http://www.fookes.us/maillist.htm
      >
      > Yahoo! Groups Links
      >
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.