OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   help XML

[ Lists Home | Date Index | Thread Index ]

Hi everybody,

I am trying to  create a simple xml. This is the way I want to display my info in html:
Proeverij 272
Prinsengracht 272, Jordaan, Amsterdam

I have a DTD, a XML and a XSLT but somehow it doesn't display all the info (the address info) I want.
Many thanx in advance,

<!DOCTYPE guide [
     <!ELEMENT guide (restaurant)>
     <!ELEMENT restaurant (name,address,kitchen,payment)>
     <!ELEMENT name (#PCDATA)>
     <!ELEMENT address (address, area?, city)>
     <!ELEMENT area (#PCDATA)>
     <!ELEMENT city (#PCDATA)>
     <!ELEMENT kitchen (#PCDATA)>
     <!ELEMENT payment (#PCDATA)>

     <!ATTLIST address str_name CDATA #REQUIRED>
     <!ATTLIST address str_number CDATA #REQUIRED>

A piece of my XML:
      <name>Proeverij 274</name>
      <address str_name="Prinsengracht" str_number="274" area="Jordaan" city="Amsterdam" />
      <payment>visa, mastercard, pin</payment>

?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<body style="font-family:Arial,helvetica,sans-serif;font-size:12pt">
<h2>My Restaurants Guide</h2>
<xsl:for-each select="guide/restaurant">
<xsl:value-of select="name" />
<p />
<xsl:for-each select="guide/restaurant/address">
<xsl:value-of select="str_name" />
<xsl:value-of select="str_number" />


Play online games with your friends with MSN Messenger


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS