Member Avatar for loserspearl

I can't see where the error in my CSS document is, it says location is -1, -1 which isn't inside the document, tried different ways of defining the column and "up" and "down" images and neither seem to work.

[Xerces-J 2.9.1] Checking "nasdaq.css" for Well-formedness ...
Ln -1 Col -1 - The markup in the document preceding the root element must be well-formed.

<!--defining spacing and placement or titles column headers-->
quotes      {width: 750px; margin: 20px 20px 20px 20px; font-size: 12pt}

dateTime    {display: block; position: absolute; left: 600px; top: 0px; font-size: 8pt}

heading     {display: block; font-size: 32pt; 
            font-family: Arial, Helvetica, sans-serif; font-weight: bold }

subheading  {display: block; font-size: 14pt; position: relative; top: -10px; 
            font-family: Arial, Helvetica, sans-serif; font-weight: bold}

titles      {display: block; margin-bottom: 20px}
column      {display: inline; text-decoration: underline; font-size: 8pt
            font-family: Courier New, monospace} 

<!--displaying columns with proper locations and spacing-->  
<!-- these are the two ways i tried formatting the columns
#c1             {position: absolute; left: 40px}
#c2             {position: absolute; left: 130px; text-align: right}
lastSale, #c3   {position: absolute; left: 430px; width: 70px; text-align: right}
netChange, #c4  {position: absolute; left: 510px; width: 80px; text-align: right}
pChange, #c5    {position: absolute; left: 590px; width: 80px; text-align: right}
volume, #c6     {position: absolute; left: 640px; width: 100px; text-align: right}
-->
column [id="c1"] {position: absolute; left: 40px}
column [id="c2"] {position: absolute; left: 130px; text-align: right}
column [id="c3"] {position: absolute; left: 430px; width: 70px; text-align: right}
column [id="c4"] {position: absolute; left: 510px; width: 80px; text-align: right}
column [id="c5"] {position: absolute; left: 590px; width: 80px; text-align: right}
column [id="c6"] {position: absolute; left: 640px; width: 100px; text-align: right}

stock {display: block; border-style: solid; border-color: black; border-width: 1px
        font-size: 10pt; font-family: Courier New, monospace}

symbol {position: relative; left: 40px}

<!-- 
lastSale {text-align: right}
netChange {text-align: right}
pChange {text-align: right}
volume {text-align: right}
-->
<!--class selector display with mac compatability-->

<!-- here are the two ways i tried formatting the image
stock.down {color: red; background-image:url(down.gif); 
        background-position: left, center; background-repeat:no-repeat }
stock.up {color: green; background-image:url(up.gif); 
        background-position: left, center; background-repeat:no-repeat }
-->
stock [class="down"] {color: red; background-image:url(down.gif); 
        background-position: left, center; background-repeat:no-repeat }        
stock [class="up"] {color: green; background-image:url(up.gif); 
        background-position: left, center; background-repeat:no-repeat }

Here is the XML document

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE quotes
[
   <!ELEMENT quotes (heading, subHeading, dateTime, titles, stocks)>
   <!ELEMENT heading (#PCDATA)>
   <!ELEMENT subHeading (#PCDATA)>

   <!ELEMENT dateTime (date, time)>
   <!ELEMENT date (#PCDATA)>
   <!ELEMENT time (#PCDATA)>

   <!ELEMENT titles (column, column, column, column, column, column)>
   <!ELEMENT column (#PCDATA)>
   <!ATTLIST column id ID #REQUIRED>

   <!ELEMENT stocks (stock+)>
   <!ELEMENT stock (symbol, company, lastSale, netChange, pChange, volume)>
   <!ATTLIST stock class CDATA #REQUIRED>
   <!ELEMENT symbol (#PCDATA)>
   <!ELEMENT company (#PCDATA)>
   <!ELEMENT lastSale (#PCDATA)>
   <!ELEMENT netChange (#PCDATA)>
   <!ELEMENT pChange (#PCDATA)>
   <!ELEMENT volume (#PCDATA)>
]>

<?xml-stylesheet type="text/css" href="nasdaq.css" ?>

<quotes>

   <heading>NASDAQ 100</heading>
   <subHeading>Current quotes</subHeading>
   <dateTime>
      <date>11/01/2008</date>
      <time>11:45:05</time>
   </dateTime>

   <titles>
      <column id="c1">Symbol</column>
      <column id="c2">Name</column>
      <column id="c3">Last Sale</column>
      <column id="c4">Net Change</column>
      <column id="c5">% Change</column>
      <column id="c6">Volume</column>
   </titles>

   <stocks>
      <stock class="down">
         <symbol>AAPL</symbol>
         <company>Apple Computer, Inc.</company>
         <lastSale>$15.26</lastSale>
         <netChange>-0.17</netChange>
         <pChange>-1.10%</pChange>
         <volume>5.548</volume>
      </stock>
      <stock class="up">
         <symbol>ABGX</symbol>
         <company>Abgenix, Inc.</company>
         <lastSale>$9.22</lastSale>
         <netChange>0.06</netChange>
         <pChange>0.66%</pChange>
         <volume>1.396</volume>
      </stock>
      <stock class="down">
         <symbol>ADBE</symbol>
         <company>Adobe Systems Inc.</company>
         <lastSale>$23.96</lastSale>
         <netChange>-0.98</netChange>
         <pChange>-3.93%</pChange>
         <volume>4.432</volume>
      </stock>
      <stock class="down">
         <symbol>ADCT</symbol>
         <company>ADC Telecommunications, Inc.</company>
         <lastSale>$1.80</lastSale>
         <netChange>-0.16</netChange>
         <pChange>-8.16%</pChange>
         <volume>5.980</volume>
      </stock>
   </stocks>
</quotes>

I'm pretty sure the error is in the column formatting or background image(or both), what am I doing wrong?

The error sounds like you are trying to validate your CSS with an XML validator. Are you sure your tool supports the checking of CSS?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.