468,249 Members | 1,512 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,249 developers. It's quick & easy.

Annotating/marking/labeling text in XML

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

Jun 8 '06 #1
2 1415
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


Jun 9 '06 #2
> <?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
Jun 9 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Spartanicus | last post: by
1 post views Thread by Spartanicus | last post: by
reply views Thread by dhn | last post: by
1 post views Thread by Prakash | last post: by
1 post views Thread by Hvid Hat | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.