Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

Problem with url! value in path! value

 [1/2] from: al::bri::xtra::co::nz at: 8-Jun-2002 0:55

Problem with url! value in path! value ====================================== If a URL! is in a path!, the values in the path! after the url! get combined with the URL! on some occasions, but not all. This is OK:
>> to-block probe to-path [html xmlns xml:lang lang]
html/xmlns/xml:lang/lang == [html xmlns xml:lang lang] But this?
>> x: [html/xmlns/xml:lang/lang]
== [html/xmlns/xml:lang/lang]
>> to-block x/1
== [html xmlns xml:lang/lang] :( Note that the xml:lang/lang isn't split up as the first is. I've sent this to [feedback--rebol--com]. Andrew Martin ICQ: 26227169

 [2/2] from: rotenca:telvia:it at: 7-Jun-2002 19:59

I think it is not a bug but a consequence of the load behaviour. When you load a string with a path, the function tries to figure where every element ends and of what type it is. In this case: html/xmlns/xml:lang/lang html -> word! / -> end of word xmlns -> word! / -> end of word! xml: -> start of url! xml:lang -> url! continue xml:lang/ -> url! continue xml:lang/lang -> end of url! at the end it has 3 elements for the path: 2 words and one url! Instead in this code: to path! [html xmlns xml:lang lang] to path! finds 4 different item (because of space) and builds a 4 elements path --- Ciao Romano