bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xml workspace


From: Dr . Jürgen Sauermann
Subject: Re: xml workspace
Date: Thu, 7 Jan 2021 12:46:51 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

Hi Bill,

it looks like one of your functions (I can't tell which because I am not
familiar with your functions) keeps increasing the depth of the string(s)
involved.

To see this, add 2 lines to utl∆split:

[0]   v←delim utl∆split string;b
[1]    ⍝ Split a string at delim.  No recursive algorithm
[1.1] 'utl∆split INPUT (string):' ◊ 4 ⎕CR string
[2]    b←(string∊delim)/⍳⍴string←,string
[3]    b←(0,b),[1.1]-/(b,1+⍴string),[1.1] 1,b+1
[4]    v←,(⊂string) utl∆sph ¨ ⊂[2]b
[5.1] 'utl∆split OUTPUT (v):' ◊ 4 ⎕CR v
    ∇


Then:


      t1←xml∆parseStylesheet 'body { background-color: blue; }'
utl∆split INPUT (string):
┏→━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃body { background-color: blue; }┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
utl∆split OUTPUT (v):
┏→━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃┏→━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┏⊖┓┃
┃┃body { background-color: blue; ┃ ┃ ┃┃
┃┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ ┗━┛┃
┗∊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
utl∆split INPUT (string):
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃┏→━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓┃
┃┃body { background-color: blue; ┃┃
┃┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛┃
┗∊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
utl∆split OUTPUT (v):
┏→━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃┏→━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓┃
┃┃┏→━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓┃┃
┃┃┃body { background-color: blue; ┃┃┃
┃┃┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛┃┃
┃┗∊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛┃
┗∊∊━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛


I can't tell where this happens (line [4] maybe?), but please note the
following: if the function used with the EACH operator returns a non-scalar
(like the first output above), then the non-scalar will be enclosed automatically
(so that  the shape of the result of EACH matches the shape of the argument(s)
of EACH. This is often being overlooked.

Maybe v←⊃... instead of v←,... in line 4?

Best Regards,
Jürgen


On 1/5/21 4:44 PM, Bill Daly wrote:
Can you take a look at this log file? My effort to parse a cascading style sheet is failing apparently because the string passed by xml∆parseStylesheet to utl∆split does not disclose the string to be split.

xml∆parseStylesheet  works as long as there is more than one rule to parse.

w



reply via email to

[Prev in Thread] Current Thread [Next in Thread]