xml and purpose of ccs xsl

  • Thread starter Bill Cunningham
  • Start date
B

Bill Cunningham

I'm new to xml but I think It'll be the thing of the future. Hold data and
transfer it. Then give it form somehow. That's where I get stuck.

<?xml version="1.0" ?> //left out encoding
<data>
<name>peggy</name>
</data>

Short to demonstrate my point. I'm missing <!DOCTYPE etc.... I don't know if
it's required. How do you use ccs or xsl to make this data display like
html?

Bill
 
T

Tripredacus-X

Bill Cunningham wrote:Short to demonstrate my point
I'm missing <!DOCTYPE etc.... I don't know if
it's required. How do you use ccs or xsl to make this data displa
like
html?

Bill

You do not need a DOCTYPE declaration on the XML file because the <?xm
version="1.0"?> does the same thing. You can reference the XSL as i
this example:

<?xml-stylesheet type="text/xsl" href="style.xsl"?>

The XSL will have a similar declaration after the initial XML one suc
as:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">

You may build the XSL as a HTML page. Within the HTML code you ca
reference the CSS just as would with an HTML page. For dynamic field
you use this code:

<xsl:value-of select="root/page_title"/>

where root is your root in the XML file and page_title is whatever ta
in the XML file you want to appear in that place. So generally, desig
the CSS as you would for an HTML page and design the XSL to be you
page layout. you can use this as your guide to building your XSL:

http://www.w3.org/TR/xslt

hope this helps

Tripredacus-
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top