[xslt] Help with a definition for xsldbg , and keyboard input



Hi,

I'm have a bit of trouble defining what it means 
to understand a stylesheet (the overall goal of 
xsldbg). Yes it should be possible to gather 
facts about templates, variables, source files, 
and output documents (effort intensive to 
implement). And yes I can put them into a 
xml "database" - yet another functional 
requirement. :( . But what relationships need to 
identifed to "understand" what the stylesheets do?

So I think all I can do to help is enable that 
the xml "database" to be saved to disk and the 
user can then create/run another stylesheet for 
the "database" to format it to help "understand". 

------------
I plan to add a walk command which takes a speed 
as an argument. During a "walk" a key '0' to '9' 
can be pressed to indicate the new speed to walk 
at. This rely's on the ability to 
   1) Delay program execution for a fixed range 
of times
   2) Determine if a key is available from the 
keyboard (standard input) after performing a 
delay mentioned above. 
  
For problem 1) 
  o on *nix there is usleep(noOfMicroseconds)
  o on windows there is sleep(noOfMilliseconds)
  o I could just gobble up CPU cycles using loops 
that do nothing.

For problem 2) 
   o for *nix there is FD_ZERO function. 
   o for windows I can use getch since it returns 
imediately 
   o ANSIC supports signals so I could capture 
signal SIGINT (<Ctrl-c>) and try to recover. But 
this seems to be a rough way to handle the 
problem. 

-----------------

Suggestions? I'm sure there's a better way just 
can't think what it is :)

bye,

Keith 





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