Hello,

Class assignment, I get partway there, but borders do not show up. We have text files we turn into XML and css by inserting some prefixes and namespaces, etc. Each listing under an agent should be in its own box with a border. I just get long paragraphs after each agent. Please help. Thanks.

/*
   New Perspectives on XML
   Tutorial 2
   Case Problem 4
   Filename: agents.css

   Author: computerbear	
   Date: December 14, 2010


   This file contains styles used with agent information

*/

@namespace ag URL(http://www.midwesthomes.org/agents4);


agent 
   {display: block; font-family: Arial, Helvetica, sans-serif; margin-top: 10px}

name  
   {display: block; font-size: 14pt; letter-spacing: 4; color: blue}

phone 
   {display: block; font-size: 10pt}

email 
   {display: block; font-size: 10pt}


/* place namespace escape style below */

ag\:agent 
   {display: block; font-family: Arial, Helvetica, sans-serif; margin-top: 10px}

ag\:name  
   {display: block; font-size: 14pt; letter-spacing: 4; color: blue}

ag\:phone 
   {display: block; font-size: 10pt}

ag\: email 
   {display: block; font-size: 10pt}
/*
   New Perspectives on XML
   Tutorial 2
   Case Problem 4
   Filename: listings.css

   Author: computerbear
   Date: December14, 2010  


   This file contains styles used with property listings

*/

@namespace list URL(http://www.midwesthomes.org/list);


property 
   {display: block; width: 300px; font-size: 9pt; padding: 10px; margin: 5px;
    border: 1px solid black; background-color: ivory}

address   
   {display: block}

street 
   {display: block}

price 
   {display: block}

description 
   {display: block; border-top: 1px solid black; margin-top: 5px; padding: 5px;
    background-color: white}


/* place namespace escape style below */

\:property 
   {display: block; width: 300px; font-size: 9pt; padding: 10px; margin: 5px;
    border: 1px solid black; background-color: ivory}

\:address   
   {display: block}

\:street 
   {display: block}

\:price 
   {display: block}

\:description 
   {display: block; border-top: 1px solid black; margin-top: 5px; padding: 5px;
    background-color: white}
<?xml version="1.0" encoding "UTF-8" standalone="yes" ?>
<!--
   New Perspectives on XML
   Tutorial 2
   Case Problem 4

   MidWest Homes New Listings
   Author: computerbear
   Date: December 14, 2010   

   Filename:         house.htm
   Supporting Files: agents4.css, house.css, listings.css, logo.jpg
-->

<html xmlns="http://www.w3.irg/1999/xhtml"
      xmlns:ag="http://www.midwesthomes.com/agents4"
      xmlns:list="http://www.midwesthomes.com/listings">

<head>
<title>MidWest Homes: New Listings</title>
<link rel="stylesheet" href="house.css" type="text/css" />
<link rel="stylesheet" href="agents4.css" type="text/css" />
<link rel="stylesheet" href="listings.css" type="text/css" />
</head>

<body>
<div id="heading"><img src="logo.jpg" alt="MidWest Homes" /></div>
<h1>New Listings</h1>
<ag:agents>
   <ag:agent id="a2140">
      <ag:name>Karen Fawkes</ag:name>
      <ag:phone>(608) 555-3414</ag:phone>
      <ag:email>karen_fawkes@tofferrealty.com</ag:email>
   </ag:agent>
   <list:listings>
      <list:property rln="r317080" agent="a2140">
         <list:address>
            <list:street>2638 Maple Avenue</list:street>
            <list:city>Padua</list:city>
            <list:state>WI</list:state>
            <list:zip>53701</list:zip>
         </list:address>
         <list:price>$329,000</list:price>
         <list:description>Very nice home on a one block dead end street with woods nearby. 
         Very special location for quiet and privacy! Home features open floor plan with 
         large rooms - new patio doors to pretty yard. updates: shingles, vinyl siding, 
         refrig and dishwasher, garage door. Fireplace in family room flanked by great 
         built-ins. add first floor laundry and award winning Padua schools.
         </list:description> 
      </list:property>
      <list:property rln="r317083" agent="a2140">
         <list:address>
            <list:street>77 East Creek Road</list:street>
            <list:city>Argyle</list:city>
            <list:state>WI</list:state>
            <list:zip>56981</list:zip>
         </list:address>
         <list:price>390,000</list:price>
         <list:description>Quality built 2 story on wooded lot adjacent to park. Large entry with 
         tile flr. Formal lr and dr w/chair rail and crown molding. Eat-in kitchen with breakfast 
         bar and patio door that opens to a lrg deck. Fam rm w/built-in bookcases and woodburning 
         fp. 4 bdrms on 2nd flr. Master w/walk-in closet and 3/4 bath. Fin ll has rec rm and 
         office/exercise rm. Lots of space in the unfinished lower level. 3 car tandem garage. 
         Home warranty included.   
         </list:description> 
      </list:property>
      <list:property rln="r317086" agent="a2140">
         <list:address>
            <list:street>3810 Stamford Lane</list:street>
            <list:city>Oseola</list:city>
            <list:state>WI</list:state>
            <list:zip>53414</list:zip>
         </list:address>
         <list:price>$415,400</list:price>
         <list:description>Stunning custom built 2-story 4 br home features 1st floor large master suite 
         w/wic, dual vanitites, whirlpool tub and separate shower. Large great rm w/gas fp, formal dr/lr. 
         Large kitchen w/center island, planning desk, and dinette. Hardwood flrs cover 2-story foyer, 
         dinette, kitchen and powder rm. Cathedral ceiling highlights open flr plan. Maple cabinets, 
         solid oak trim throughout. Job relo-highly motivated seller. All measurements approx.
         </list:description> 
      </list:property>
   </list:listings>

      <ag:agent id="a2141">
         <ag:name>Linda DeJesus</ag:name>
         <ag:phone>(608) 555-4140</ag:phone>
         <ag:email>ldejesus@carsonhomes.com</ag:email>
      </ag:agent>
   <list:listings>
      <list:property rln="r317081" agent="a2141">
         <list:address>
            <list:street>3014 Allen Lane</list:street>
            <list:city>Broxton</list:city>
            <list:state>WI</list:state>
            <list:zip>53987</list:zip>
         </list:address>
         <price>$414,000</price>
         <list:description>Surround fireplace. Quality thru-out! Call lister for completion 
         date. Wow! Expect to be impressed with this new 4-bdrm transitional home! All 
         the upgrades for the distinguished buyer. Large entertaining kitchen w/corian counters, 
         birch cabinets, maple flr and trim, lg work island. Pella windows everywhere. 200amp, 
         ge profile appliances, whirlpool bath, kohler plumbing, trayed master, 
         exposed ll w/8ft9in ceilings. 15-yr waterproof warrty, tile surround fireplace. 
         Quality thru-out! Call lister for completion date.
         </list:description> 
      </list:property>
      <list:property rln="r317084" agent="a2141">
         <list:address>
            <list:street>41 Mohawk Street</list:street>
            <list:city>Stratmore</list:city>
            <list:state>WI</list:state>
            <list:zip>58105</list:zip>
         </list:address>
         <list:price>$441,900</list:price>
         <list:description>Spectacular new ranch w/ extra deep yard! Vaulted great room has gas frplc. 
         Spacious kitch w/pantry and brkfst bar. 1st flr laundry rm, walk-in closet and double 
         vanity bath in master. Br 3 set up as a study w/french doors walkout ll w/over 
         1200 sq ft for future finish! 14'x10' deck. Landscaping. Also an air-air exchanger for 
         a healthier home w/hepa filter, 20 yr warranty tuff n dri water proofing, too! 6 panel 
         doors, oak trim. Ready for move in!  
         </list:description> 
      </list:property>
   </list:listings>



   <ag:agent id="a2142">
         <ag:name>Lawrence Rao</ag:name>
         <ag:phone>(414) 555-8580</ag:phone>
         <ag:email>lkrao@rawlingscompany.com</ag:email>
      </ag:agent>
   </ag:agents>

   <list:listings>
      <list:property rln="r317082" agent="a2142">
      <list:address>
         <list:street>505 Brandit Road</list:street>
         <list:city>Cutler</list:city>
         <list:state>WI</list:state>
         <list:zip>55709</list:zip>
      </list:address>
      <list:price>$405,200</list:price>
      <list:description>A picture perfect home in a fantastic location. 4 bedrooms, formal 
      dining and living room, a family room with wood burning fireplace and a lower level 
      rec room. Close to Padua and Argyle with 1.67 acres of breathing space. Wood 
      floors throughout, tile entry, 6 panel doors, 2 car garage and a home warranty so you 
      can buy with confidence!
      </list:description> 
   </list:property>
   <list:property rln="r317085" agent="a2142">
      <list:address>
         <list:street>88 Atkins Avenue</list:street>
         <list:city>Padua</list:city>
         <list:state>WI</list:state>
         <list:zip>53704</list:zip>
      </list:address>
      <list:price>$405,200</list:price>
      <list:description>Expect to be impressed with this stunning ranch home situated on wooded 
      lot backing to city bike trail. Home features include maple flrs, painted trim, spacious 
      kitchen with 2 pantries and island with breakfast bar, huge great room with gorgeous view. 
      Tray clg in dining, large master wp suite with tray ceiling, 10x18 deck, 12x12 patio, walkout 
      ll, prof landscaping, air exchanger for healthier home and so much more!!
      </list:description> 
   </list:property>
   <list:property rln="r317089" agent="a2142">
      <list:address>
         <list:street>515 Lawrence Avenue</list:street>
         <list:city>Padua</list:city>
         <list:state>WI</list:state>
         <list:zip>53706</list:zip>
      </list:address>
      <list:price>$374,500</list:price>
      <list:description>Spacious 4 bedroom 2 story home featuring 9' ceilings first floor, 
      wood floors kitchen and foyer, great room with gas fireplace, large kitchen with 
      dinette, first floor laundry room, exposed lower level with 8'6 ceilings for future 
      living area, 2 car tandem garage.
      </list:description> 
   </list:property>
</list:listings>
</ag:agents>
      
<div id="main">
</div>

<List:address>
MidWest Homes · 1100 Commerce Drive · Cutler, WI 55901
</list:address>

</body>

</html>

Recommended Answers

All 2 Replies

try adding this under the block.

border-bottom-width="1.0mm" border-bottom-color="black" border-bottom-style="solid">

so with a block it would look like

<fo:block  border-bottom-width="1.0mm" border-bottom-color="black" border-bottom-style="solid">
</fo:block>

If you want them all around instead of only at the bottom, just do this.

<fo:block 
border-width="1.0mm" border-color="black" border-style="solid">
</fo:block>

Thank you for the reply. But we should not have to do this. We are given the shell and are told pretty specifically what to add. That is why I get so frustrated. I finally got this to work by moving a line or two to a different position. Lines 182 and 183 to just after line 27.

<head>
<title>MidWest Homes: New Listings</title>
<link rel="stylesheet" href="house.css" type="text/css" />
<link rel="stylesheet" href="agents.css" type="text/css" />
<link rel="stylesheet" href="list.css" type="text/css" />
</head>

<body>
<div id="heading"><img src="logo.jpg" alt="MidWest Homes" /></div>
<div id="main">
</div>
<h1>New Listings</h1>

Go figure. Thanks again!

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.