Skip to main content

developerWorks >  XML  >  Forums  >  Working XML forum  >  developerWorks

Help needed with XML and CSS    Point your RSS reader here for a feed of the latest messages in this thread


     

 
 

My developerWorks
 Welcome, Guest
Sign in or register
This question is not answered.

Permlink Replies: 0 - Pages: 1 Threads: [ Previous | Next ]
spandy

Posts: 4
Registered: Oct 23, 2009 05:25:09 AM
Help needed with XML and CSS
Posted: Oct 23, 2009 05:52:53 AM
 
Click to report abuse...   Click to reply to this thread Reply
ex1.xml
<?xml version="1.0" encoding="utf-8" ?>
<?xml:stylesheet href="ex1.css" type="text/css"?>
<root>
<book>
<title>The Autobiography of Benjamin Franklin</title>
<author>
<_firstname> Benjamin </_firstname>
<lastname> Franklin</lastname>
</author>
<price>8.99</price>
</book>

<Book>
<title>JavaScript: The Definitive Guide</title>
<author>
<_firstname>David</_firstname>
<lastname>Flannagan</lastname>
</author>
<price>11.99</price>
</Book>

<BOOK>
<title>Advanced Perl Programming</title>
<author>
<_firstname>Sriram</_firstname>
<lastname>Srinivasan</lastname>
</author>
<price>15.99</price>
</BOOK>

<bOOk>
<title>Java AWT Reference</title>
<author>
<_firstname>John</_firstname>
<lastname>Zukowski</lastname>
</author>
<price>20.99</price>
</bOOk>

<_Book>
<title>Practical UNIX And Internet Security</title>
<author>
<_firstname>Simson</_firstname>
<lastname>Garfinkel</lastname>
</author>
<price>26.99</price>
</_Book>
</root>

ex1.css
book
{
display:inline-block;
background-color:Maroon;
font:inherit;
font-size:large;
font-style:italic;
text-align:center;
}

Book
{
display:inlin-block;
text-align:left;
font-size:small;
}

I am running into a problem with these files, the CSS properties are being overridden here, and all the three book tags in xml follow the second set of properties from the CSS sheet. XML being case sensitive is not recognising the difference between book, BOOK and Book. It is accepting only a single set of properties and that too to all the three types of tags i.e. book, BOOK and Book.

Can anyone look into the matter??

 Tags
Help

Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular type of content or application that you're viewing.

My tags shows your tags for this particular type of content or application that you're viewing.

 

MoreLess 


Point your RSS reader here for a feed of the latest messages in all forums