|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Putting the title page in XML documents
I want to create a web page in XML and format it using CSS (as XSL is not supported yet by any browser). My question is how could I put the title page on the top bar of the browser, the one that usually we put in the <head><title>my title</title></head> tag in HTML? Thanks for you help.
|
|
#2
|
||||
|
||||
|
XSL is supported by the latest versions of the more popular browsers, but it's definately difficult to use outright. You can also use server-side languages like Perl and PHP to parse an XML file using an XSL template and return the resulting HTML. Very nice indeed.
If you use XHTML, you can mix HTML with XML and use CSS to handle the custom XML tags: Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Page Title</title>
<style type="text/css">
foo
{
display: block;
}
</style>
</head>
<body>
<foo>This is element foo.</foo>
</body>
</html>
__________________
# Jeremy Explain your problem instead of asking how to do what you decided was the solution. |
|
#3
|
|||
|
|||
|
Thanks jharnois.
For some reason(s) I want to use pure XML, not to be combined with XHTML. Any suggestion? I have tried using XSL to format my XML doc, but I could not display it on IE6, Opera7.11, and Netscape 7. Of couse I could display it if I process the XML and XSL using server scripting and and send the HTML to the browser. What I am saying is using XSL to format the XML file straightway as what CSS does. Thanks anyway. |
|
#4
|
|||
|
|||
|
Here's an overview of client-side xsl support for different browsers: http://www.w3schools.com/xsl/xsl_browsers.asp It might help you debug the problems you're having.
|
|
#5
|
|||
|
|||
|
Just to verify, are we talking about the same part of XSL? I am talking about XSL FO (formatting), not XSL Transformation. I've tried them on the browser and none come up with viewable page. But anyway, correct me if I am wrong. Thanks.
|
|
#6
|
|||
|
|||
|
I think you're right. xsl-fo isn't supported in any browsers to my knowledge.
|
|
#7
|
||||
|
||||
|
RE: Adding a `Page Title' with plain XML
Does anyone know if this is possible?
|
|
#8
|
||||
|
||||
|
It needs to be done using an XSL document.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > Putting the title page in XML documents |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|