[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Question about amrita and XHTML/CSS

Carl Youngblood

10/5/2003 4:13:00 AM

I've been looking into amrita for my ruby web development, but I am
concerned about what I see as a potential conflict with my CSS
stylesheets. From what I can tell, amrita looks for items that I have
given a specific id to, such as <div id="identifier">dynamic data goes
here</div>, so that it can then replace them with my dynamic data and
remove the id portion of the tag.

The problem I see is that I want the id tag to remain so that my CSS can
use it to add formatting information to different portions of my page.
I've been reading a good book called "Designing with Web Standards," by
Jeff Zeldman, that strongly advocates the use of XHTML transitional with
CSS to reduce page size, separate structure from presentation and
improve cross-platform compatibility. If amrita takes out all my id
tags, how do I do CSS?

Thanks,
Carl

4 Answers

Gavin Sinclair

10/5/2003 4:57:00 AM

0

On Sunday, October 5, 2003, 2:17:12 PM, Carl wrote:

> If amrita takes out all my id tags, how do I do CSS?

I'm pretty sure amrita has a method that allows you to specify what
the "id" attribute is; i.e. you can use something different if you
like. I don't remember what the methods is, though.

Gavin


James Britt

10/5/2003 5:07:00 AM

0

Carl Youngblood wrote:
> I've been looking into amrita for my ruby web development, but I am
> concerned about what I see as a potential conflict with my CSS
> stylesheets. From what I can tell, amrita looks for items that I have
> given a specific id to, such as <div id="identifier">dynamic data goes
> here</div>, so that it can then replace them with my dynamic data and
> remove the id portion of the tag.
>
> The problem I see is that I want the id tag to remain so that my CSS can
> use it to add formatting information to different portions of my page.
> I've been reading a good book called "Designing with Web Standards," by
> Jeff Zeldman, that strongly advocates the use of XHTML transitional with
> CSS to reduce page size, separate structure from presentation and
> improve cross-platform compatibility. If amrita takes out all my id
> tags, how do I do CSS?

I've not used Amrita, but does it munge *all* id attribiutes, or just
the matching items? If the latter, then you could work with bad XHTML,
using two ID attributes, with amrita emitting correct markup by removing
the extraneous attribute.

Of course, this may zap your editing tool if it finds templates with
malformed markup.

Can amrita use a namespace for special elements and attributes, to avoid
conflicting with proper XHTML?


James

PS Zeldman's book really is quite good.
>
> Thanks,
> Carl
>
>
>




Takashi & Kayoko Sano

10/5/2003 8:01:00 AM

0

Hi Carl,

Carl Youngblood <carl@ycs.biz> wrote:
> I've been looking into amrita for my ruby web development, but I
> am
> concerned about what I see as a potential conflict with my CSS
> stylesheets. From what I can tell, amrita looks for items that I
> have
> given a specific id to, such as <div id="identifier">dynamic data
> goes
> here</div>, so that it can then replace them with my dynamic data
> and
> remove the id portion of the tag.
According to Amrita's RDoc, to keep id's not for Amrita
expansion in your template, set "keep_id" of your template
to true, i.e:

your_template.keep_id = true

Or, use the "amrita_id" to use another attribute name for
Amrita expansion, like,

your_template.amrita_id = amrita

Hope this helps,

Takashi Sano

Carl Youngblood

10/6/2003 3:12:00 AM

0

Thanks for the information. I had looked at the RDoc but didn't notice
that part. Might I suggest that another nice option would be to have
amrita populate the tags with the appropriate ids but also keep those
same ids in the output, rather than always removing the ids that for
matched data?

Regardless, these options will allow me to do what I need to.

Thanks,
Carl

Takashi & Kayoko Sano wrote:
> Hi Carl,
>
> Carl Youngblood <carl@ycs.biz> wrote:
>
>>I've been looking into amrita for my ruby web development, but I
>>am
>>concerned about what I see as a potential conflict with my CSS
>>stylesheets. From what I can tell, amrita looks for items that I
>>have
>>given a specific id to, such as <div id="identifier">dynamic data
>>goes
>>here</div>, so that it can then replace them with my dynamic data
>>and
>>remove the id portion of the tag.
>
> According to Amrita's RDoc, to keep id's not for Amrita
> expansion in your template, set "keep_id" of your template
> to true, i.e:
>
> your_template.keep_id = true
>
> Or, use the "amrita_id" to use another attribute name for
> Amrita expansion, like,
>
> your_template.amrita_id = amrita
>
> Hope this helps,
>
> Takashi Sano
>