Annotating/marking/labeling text in XML

N

noblEnds

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
 
J

Joe Kesselman

<?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.
 

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,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top