amrita parse error

C

Carl Youngblood

Hello,
I'm building a web site with ruby/mod_fastcgi/postgres that uses amrita
for it's presentation layer. I'm having a problem parsing XHTML files.
Specifically, when I try to add the XHTML namespace declaration:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

I get the following amrita error:

....
/usr/local/lib/ruby/site_ruby/1.8/amrita/template.rb:402:in `expand'
/usr/local/lib/ruby/site_ruby/1.8/amrita/template.rb:138:in `expand'
/usr/local/lib/ruby/site_ruby/1.8/amrita/template.rb:144:in `setup'
/usr/local/lib/ruby/site_ruby/1.8/amrita/template.rb:179:in `setup_template'
/usr/local/lib/ruby/site_ruby/1.8/amrita/template.rb:396:in `load_template'
/usr/local/lib/ruby/site_ruby/1.8/amrita/parser.rb:279:in `parse_file'
/usr/local/lib/ruby/site_ruby/1.8/amrita/parser.rb:279:in `open'
/usr/local/lib/ruby/site_ruby/1.8/amrita/parser.rb:280:in `parse_file'
/usr/local/lib/ruby/site_ruby/1.8/amrita/parser.rb:275:in `parse_io'
/usr/local/lib/ruby/site_ruby/1.8/amrita/parser.rb:301:in `parse'
error hapend in /var/www/pennytracker/templates/signup.html:0(can't happen)
==>:lang="en" lang="en">

I'm trying to follow some of the best practices recommended in Zeldman's
DESIGNING WITH WEB STANDARDS, which by the way is a must-read for any
aspiring web developer. He says this declaration is important. Whether
it is important or not, it's sad that amrita doesn't know how to parse
XHTML.

The whole approach of parsing HTML seems like overkill to me. I haven't
found a better template option than amrita so far, but it seems like the
better solution would be to embed template instructions in HTML comments
and ignore everything else.

Any ideas about how to fix this parse error?

Thanks,
Carl
 
S

Shu-yu Guo

I was disatisfied with amrita's speed, so I have written a simpler XML
template system using ruby-xmlparser (expat) which acts like a very stripped
down version of amrita. It works, but I just wrote it very recently for my own
website and haven't had too much time to thoroughly test it. It also isn't
documented at all.

If you are interested, grab the file at

http://www.rufuran.org/kodama.tar.gz

Since it's not documented and has somewhat different usage than amrita, please
email me if you can't figure out how to use it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,111
Latest member
KetoBurn
Top