Annotating/marking/labeling text in XML

Discussion in 'XML' started by noblEnds, Jun 8, 2006.

  1. noblEnds

    noblEnds Guest

    Hi. A quick thanks to those who try to help. here's what i'm trying
    to do:

    <?xml>
    <stuff>
    <theStory>

    <p>aaklsjd fakljs fakjs faskldj a;klsjdf l;aksdj f THIS TEXT SHOULD BE
    HIGHLIGHED a;klsdjf a;slkjdf a;skljdf a;slkjdf a;slkjf a;sklj fas;kl
    jf;ak s</p>

    <p> askljdf laksjdf ;alksjdf a;skljdf ;askldjf; askdlfj ;sdlkfj THIS
    TEXT SHOULD ALSO BE HIGHLIGHTED alksjdf a;klsjfd a;slkdfja s;dfkjas;
    dfaklsjd f</p>

    </theStory>
    </stuff>

    so my question is how can i somehow mark up the text in the xml so as
    to be able to treat it later via CSS?

    Thanks,
    eric
    noblEnds, Jun 8, 2006
    #1
    1. Advertising

  2. noblEnds

    noblEnds Guest

    I've put up a detailed explanation of the problem at
    www.ericcorriel.com/xml_problem.php.


    Thanks again to anyone who tries to help.


    noblEnds wrote:
    > Hi. A quick thanks to those who try to help. here's what i'm trying
    > to do:
    >
    > <?xml>
    > <stuff>
    > <theStory>
    >
    > <p>aaklsjd fakljs fakjs faskldj a;klsjdf l;aksdj f THIS TEXT SHOULD BE
    > HIGHLIGHED a;klsdjf a;slkjdf a;skljdf a;slkjdf a;slkjf a;sklj fas;kl
    > jf;ak s</p>
    >
    > <p> askljdf laksjdf ;alksjdf a;skljdf ;askldjf; askdlfj ;sdlkfj THIS
    > TEXT SHOULD ALSO BE HIGHLIGHTED alksjdf a;klsjfd a;slkdfja s;dfkjas;
    > dfaklsjd f</p>
    >
    > </theStory>
    > </stuff>
    >
    > so my question is how can i somehow mark up the text in the xml so as
    > to be able to treat it later via CSS?
    >
    > Thanks,
    > eric
    noblEnds, Jun 9, 2006
    #2
    1. Advertising

  3. > <?xml>

    That isn't correct XML syntax, of course.

    > so my question is how can i somehow mark up the text in the xml so as
    > to be able to treat it later via CSS?


    The way you mark things, in CSS or HTML, so you can style them specially
    is to wrap them in an element which CSS can match on. In HTML, that
    often takes the form of a <div> or <style> element, which is harmless
    but which can be processed by CSS to add the necessary style attributes.

    Whether a suitable element exists in your XML language depends on the
    DTD or schema. If it doesn't, you probably need to think about
    separating the data representation of your XML from the displayed
    representation, and that means getting into XSLT stylesheets, which are
    more powerful than CSS and can rewrite documents rather than merely
    annotate them.


    --
    () ASCII Ribbon Campaign | Joe Kesselman
    /\ Stamp out HTML e-mail! | System architexture and kinetic poetry
    Joe Kesselman, Jun 9, 2006
    #3
    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. andy

    ncsim and signal labeling

    andy, Oct 22, 2004, in forum: VHDL
    Replies:
    1
    Views:
    721
    Eyck Jentzsch
    Oct 26, 2004
  2. Chris Smith

    Map labeling in Java

    Chris Smith, Jul 30, 2004, in forum: Java
    Replies:
    0
    Views:
    446
    Chris Smith
    Jul 30, 2004
  3. Xah Lee
    Replies:
    1
    Views:
    402
    Johannes Koch
    Jul 7, 2005
  4. Cant Think Today

    Labeling Jagged (Multi-D) Arrays

    Cant Think Today, Sep 3, 2004, in forum: C++
    Replies:
    5
    Views:
    383
    Mike Wahler
    Sep 5, 2004
  5. Hvid Hat

    Marking words in a text

    Hvid Hat, Apr 11, 2008, in forum: XML
    Replies:
    7
    Views:
    458
    Peter Flynn
    Apr 13, 2008
Loading...

Share This Page