XML Multiple Attributes with CSS?????

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • TechieGrl

    XML Multiple Attributes with CSS?????

    Hello.

    It's been awhile since I've been in the XML world, but before I go
    down a possibly unnecessary path, I wanted to ask about using CSS and
    XML files. Is it possible to style multiple attributes inside of
    elements using CSS?

    For example

    <NAME first="Joe" middle="Bob" last="Johnson">

    Can I style the first middle and last attributes using CSS or am I
    going to need to use XSL? Any other ideas someone might have would be
    appreciated.

    Thanks!
  • Martin Honnen

    #2
    Re: XML Multiple Attributes with CSS?????

    TechieGrl wrote:
    It's been awhile since I've been in the XML world, but before I go
    down a possibly unnecessary path, I wanted to ask about using CSS and
    XML files. Is it possible to style multiple attributes inside of
    elements using CSS?
    >
    For example
    >
    <NAME first="Joe" middle="Bob" last="Johnson">
    >
    Can I style the first middle and last attributes using CSS or am I
    going to need to use XSL? Any other ideas someone might have would be
    appreciated.
    With CSS you style elements not attributes. You can write selectors
    making use of attribute values but attribute values are not rendered and
    can't be styled therefore with CSS. You will need to apply XSLT to
    transform attribute values to element contents that can be styled.



    --

    Martin Honnen

    Comment

    • Peter Flynn

      #3
      Re: XML Multiple Attributes with CSS?????

      Martin Honnen wrote:
      TechieGrl wrote:
      >
      >It's been awhile since I've been in the XML world, but before I go
      >down a possibly unnecessary path, I wanted to ask about using CSS and
      >XML files. Is it possible to style multiple attributes inside of
      >elements using CSS?
      >>
      >For example
      >>
      ><NAME first="Joe" middle="Bob" last="Johnson">
      >>
      >Can I style the first middle and last attributes using CSS or am I
      >going to need to use XSL? Any other ideas someone might have would be
      >appreciated.
      >
      With CSS you style elements not attributes. You can write selectors
      making use of attribute values but attribute values are not rendered and
      can't be styled therefore with CSS. You will need to apply XSLT to
      transform attribute values to element contents that can be styled.
      CSS does actually provide a function for the exposure of attribute
      values but it's widely ignored by browser writers.

      ///Peter

      Comment

      • Martin Honnen

        #4
        Re: XML Multiple Attributes with CSS?????

        Peter Flynn wrote:
        CSS does actually provide a function for the exposure of attribute
        values but it's widely ignored by browser writers.


        I think support is coming in the soon to be released Firefox 3 and the
        later to be released IE 8. At least I think that the Acid test covers that.

        --

        Martin Honnen

        Comment

        Working...