Re: HTML named characters

2006-01-08 Thread Mark Brownell


On Sunday, January 8, 2006, at 07:30 AM, 
[EMAIL PROTECTED] wrote:



And many others.



This is from the htmlText property - yes? But that requires me to set
the htmlText of a field... which is not such fun for a parser :)
Guess I will have to manually stick them all in an array?


I've had extensive experience in using my own home grown parsers.

This works fast and is very stable:

revCode replace thisStringEscape with thisCharacter in 
thisChunkExpression /revCode


I forgot the secret decoder-ring tag-set for rev code...

I've been busy building an RSS, OPML conversion importer into Intuition 
1.5, not out yet, so that users can auto download RSS from a hyperlink 
in Intuition's viewing window. I'm adding an auto download multiple 
Intuition files for merging from the RSS reader so that the user can 
keep up with information available from MTML websites created using 
Intuition. http://www.leveltron.com/index.html


With RR I have been able to create a very high speed pull-parser that 
works as a function and strips out first occurrences or an array of 
occurrences of element  attribute type XML tags.  I have used this to 
create a multi-columned browser window with a columnLeft width=200 
Left column MTML here /columnLeft that resizes  two fields of the 
Intuition window for the MTML coder that sets up the display page. I 
even used this parser to embed base64encoded images that display when 
downloading of a single Intuition file. Intuition 1.5 will be out in 
the next few weeks. I need to create more content to show it off.


I'm in digest mode, please cc me if responding.

Mark

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: HTML named characters

2006-01-07 Thread Eric Chatonet

Hi David,

From the docs:

Á   Aacute;
á   aacute;
   Acirc;
â   acirc;
´   acute;
Æ   AElig;
æ   aelig;
À   Agrave;
à   agrave;
Å   Aring;
å   aring;
à  Atilde;
ã   atilde;
Ä   Auml;
ä   auml;

And many others.
I tried with my Encoded Text Picker and it worked as expected.

Le 6 janv. 06 à 23:17, David Bovill a écrit :

Am I right that there is no built in function to convert HTML named  
characters (auml;)?


Best Regards from Paris,
Eric Chatonet
 
--

http://www.sosmartsoftware.com/[EMAIL PROTECTED]/


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: HTML named characters

2006-01-07 Thread David Bovill

On 7 Jan 2006, at 23:30, Eric Chatonet wrote:


Hi David,

From the docs:

ÁAacute;
áaacute;
ÂAcirc;
âacirc;
´acute;
ÆAElig;
æaelig;
ÀAgrave;
àagrave;
ÅAring;
åaring;
ÃAtilde;
ãatilde;
ÄAuml;
äauml;

And many others.



This is from the htmlText property - yes? But that requires me to set  
the htmlText of a field... which is not such fun for a parser :)  
Guess I will have to manually stick them all in an array?


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: HTML named characters

2006-01-07 Thread Eric Chatonet

Hi David,

I think you can use two different ways:

1. By scripting:
Should be something like that.
If you want to take into account all special characters (about one  
hundred), the second way could appear better.


function StripTags pHtml -- returns the meaningful text from a web page
  local tRegex,tPrevText
  constant kHtml =  
eacute;,agrave;,ccedil;,gt;,lt;,ecirc;,egrave;,copy;,#149;,#39 
;,middot;,amp;

  constant kConvertedHtml = é,à,ç,,,ê,è,©,•,',·,
  -
  replace return with space in pHtml
  replace numtochar(13) with empty in pHtml
  replace tab with empty in pHtml
  -
  put replacetext(pHtml,(?Usi)SCRIPT.*/SCRIPT,) into pHtml
  put replacetext(pHtml,(?Usi)STYLE.*/STYLE,) into pHtml
  put replacetext(pHtml,(?Usi)\?.*\?,) into pHtml
  -
  replace nbsp; with space in pHtml
  replace BR with return in pHtml
  replace p with return in pHtml
  -
  put  [^]* into tRegex
  put replacetext(pHtml,tRegex,) into pHtml
  put replacetext(pHtml,tRegex,) into pHtml
  -
  repeat until tPrevText is pHtml
put pHtml into tPrevText
put replacetext(pHtml, +,space) into pHtml
put replacetext(pHtml,^ ,) into pHtml
  end repeat
  -
  replace (space  return) with return in pHtml
  replace (return  space) with return in pHtml
  filter pHtml without empty
  -
  replace quot; with quote in pHtml
  repeat with i = 1 to the number of items of kHtml
replace item i of kHtml with item i of kConvertedHtml in pHtml
  end repeat
  -
  return pHtml
end StripTags

2. By placing the text into a field:
We discussed this way of doing some months ago and it appeared (I  
think that it was Richard who pointed that out) that the fastest way  
seemed to use a field in a substack without opening it (if I remember  
correctly :-)


on StripTags pHtml
  set the htmlText of fld HtmlTemplate of stack HtmlConverter to  
pHtml

  return the text of fld HtmlTemplate of stack HtmlConver
end StripTags

Best Regards from Paris,
Eric Chatonet

Le 7 janv. 06 à 01:10, David Bovill a écrit :


On 7 Jan 2006, at 23:30, Eric Chatonet wrote:


Hi David,

From the docs:

ÁAacute;
áaacute;
ÂAcirc;
âacirc;
´acute;
ÆAElig;
æaelig;
ÀAgrave;
àagrave;
ÅAring;
åaring;
ÃAtilde;
ãatilde;
ÄAuml;
äauml;

And many others.



This is from the htmlText property - yes? But that requires me to  
set the htmlText of a field... which is not such fun for a  
parser :) Guess I will have to manually stick them all in an array?


 
--

http://www.sosmartsoftware.com/[EMAIL PROTECTED]/


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution