Question about amrita and XHTML/CSS

Discussion in 'Ruby' started by Carl Youngblood, Oct 5, 2003.

  1. 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
    Carl Youngblood, Oct 5, 2003
    #1
    1. Advertising

  2. 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
    Gavin Sinclair, Oct 5, 2003
    #2
    1. Advertising

  3. Carl Youngblood

    James Britt Guest

    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
    >
    >
    >
    James Britt, Oct 5, 2003
    #3
  4. Hi Carl,

    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.

    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
    Takashi & Kayoko Sano, Oct 5, 2003
    #4
  5. 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 <> 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, Oct 6, 2003
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. xhtml champs
    Replies:
    0
    Views:
    451
    xhtml champs
    Aug 1, 2011
  2. xhtml champs
    Replies:
    0
    Views:
    1,014
    xhtml champs
    Aug 2, 2011
  3. Carl Youngblood

    amrita question

    Carl Youngblood, Dec 19, 2003, in forum: Ruby
    Replies:
    7
    Views:
    140
    Carl Youngblood
    Dec 19, 2003
  4. Michael Campbell

    Amrita question(s)

    Michael Campbell, Dec 19, 2003, in forum: Ruby
    Replies:
    2
    Views:
    88
    Carl Youngblood
    Dec 19, 2003
  5. Carl Youngblood

    amrita question

    Carl Youngblood, Dec 24, 2003, in forum: Ruby
    Replies:
    2
    Views:
    111
    Ara.T.Howard
    Dec 24, 2003
Loading...

Share This Page