RE: XSL and XML

Subject: RE: XSL and XML
From: "Trahan, Shane" <srt@xxxxxxx>
Date: Mon, 26 Apr 1999 12:01:35 -0400
Thank you all so much for getting me started..

I am trying to adhere to standards as much as possible.. What is the
difference bewteen the XSL and the CSS? Does IE5 support XSL and not CSS and
then Gecko support CSS and not XSL?

I hope that this is not the case..


Being kind of familier with CSS it seems to only "Present" the information..
Is XSL more robust?









-----Original Message-----
From: Chris Lilley [mailto:chris@xxxxxx]
Sent: Saturday, April 24, 1999 7:26 PM
To: xsl-list@xxxxxxxxxxxxxxxx
Subject: Re: XSL and XML




"Trahan, Shane" wrote:

> Here is just an example of my code..
> 
> MYFIRST.DTD
> <!ELEMENT FromQtr1 (DUID,STATCODE,FIID,QEXTYPE,ROC)>
>         <!ELEMENT DUID (#PCDATA)*>
>         <!ELEMENT STATCODE (#PCDATA)*>
>         <!ELEMENT FIID (#PCDATA)*>
>         <!ELEMENT QEXTYPE (#PCDATA)*>
>         <!ELEMENT ROC (#PCDATA)*>
> 
> XMLTEST.XML
> <?xml version ="1.0"?>
> <!DOCTYPE QTR1 SYSTEM "MyFirst.dtd">
> <FromQtr1>

The top level element has to match the  name in the doctype declaration

>         <DUID>NJ08020157</DUID>
>         <StatCode>02</StatCode>

XML is case sensitive. STATCODE is not the same element as StatCode.

>         <FIID>458000</FIID>
>         <QEXTYPE>CAI</QEXTYPE>
>         <ROC>1.0</ROC>
> </FromQtr1>

<?xml version ="1.0"?>
<!DOCTYPE FromQtr1 SYSTEM "MyFirst.dtd">
<FromQtr1>
        <DUID>NJ08020157</DUID>
        <STATCODE>02</STATCODE>
        <FIID>458000</FIID>
        <QEXTYPE>CAI</QEXTYPE>
        <ROC>1.0</ROC>
</FromQtr1>

So, now you have a valid document, you can display it using eiother CSS
or XSL (or indeed a Java applet or whatever you want).

<?xml version ="1.0"?>
<?xml-stylesheet type="text/css" href="myfirst.css"?>
<!DOCTYPE FromQtr1 SYSTEM "MyFirst.dtd">
<FromQtr1>
        <DUID>NJ08020157</DUID>
        <STATCODE>02</STATCODE>
        <FIID>458000</FIID>
        <QEXTYPE>CAI</QEXTYPE>
        <ROC>1.0</ROC>
</FromQtr1>

Now you have a link to a stylesheet in there, so you need a stylesheet,
called myfirst.css:

FromQtrl {display: block; clor: black; background: white; margin: 5%}
DUID, STATCODE,FIID,QEXTYPE,ROC { display: inline }
DUID {color: red; border: thin solid green}
FIID {color: blue }
ROC (color: green }

Without seeing a larger example or knowing what the elements mean, its
difficult to produce a meaningful stylesheet.

--
Chris



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread