Click to See Complete Forum and Search --> : XML Entities
crh3675
01-28-2004, 01:13 PM
Is it possible to create a new ENTITY reference to an XHTML document that already has a DOCTYPE specified?
In other words, can I extend the DOCTYPE statement to include my own custom ENTITIES?
crh3675
01-29-2004, 01:41 PM
Does anyone understand my request? You can specify your own <DOCTYPE> for an XMl document as well as define ENTITIES using <!ENTITY myentity "somevalue">. Can I use this to extend an XML or XHTML document that already has the DOCTYPE specified as <!doctype html
public "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Khalid Ali
01-29-2004, 04:53 PM
no you can't do that,however, you cna create xml elements and aply new style to them and view them in the browser.
crh3675
01-30-2004, 09:14 AM
Then this should work right?
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title> new document </title>
<style type="text/css">
//<![CDATA[
job {color:red;}
//]]>
</style>
</head>
<body>
<job>
systems admin
</job>
</body>
</html>
but does not.
fredmv
01-30-2004, 02:35 PM
There's a valid reason that isn't working: you can't use C++-style comments in CSS — only C-style comments are considered valid. Therefore, your CSS should look like this:<style type="text/css">
/*<![CDATA[*/
job { color: red; }
/*]]>*/
</style>It should now work as expected.
crh3675
01-30-2004, 02:43 PM
No dice:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title> new document </title>
<style type="text/css">
/*<![CDATA[ */
job {color:red;}
/*]]> */
</style>
</head>
<body>
<job>
systems admin
</job>
</body>
</html>
Will not work.
fredmv
01-30-2004, 02:48 PM
Let me guess — are you using that piece of junk IE? If so, that's why it isn't working — because IE isn't a fully-fledged XML processor. You might have to use HTML namespaces to get it working in IE. That code worked flawlessly in Mozilla.
crh3675
01-30-2004, 03:08 PM
I got it to work in Mozilla, Firebird and NS7. Damn that IE!
crh3675
01-30-2004, 03:08 PM
I got it to work in Mozilla, Firebird and NS7. Damn that IE! :mad:
Thanks!:)
fredmv
01-30-2004, 03:10 PM
I know, IE sucks. No problem man. ;)