I have some HTML5 files in which I embedded XML through object element. Now, for the HTML files I have alternate stylesheets. What I want to do is to change the style for the embedded XML (because the XML file has its own stylesheet) in the same time with the HTML. So, when I choose a style for the HTML page with the help of the browser, I want the style of the XML to be also changed. Is there any way to do this?
HTML:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>LondonDiamond Restaurant Menu</title>
<meta charset="UTF-8" />
<link rel="stylesheet" type="text/css" href="../css/style.css" media="screen" title="Standard red black white"/>
<link rel="stylesheet" type="text/css" href="../css/style_print.css" media="print" title="Print"/>
<link rel="alternate stylesheet" type="text/css" href="../css/alt_style.css" media="screen" title="Monochrome"/>
</head>
<body>
<object data="../xml/menu.xml"><span></span></object>
</body>
</html>
XML:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="../css/style4xml.css"?>
<!DOCTYPE menu SYSTEM "../dtd/menu.dtd">
<menu>
irrelevant
</menu>
What happens is that when I chose the alternate stylesheet for the HTML, the colors change, but the embedded XML keeps the same color (and it is normal) BUT I also want to change it in the same time with the HTML.
What I did was to apply the same default and alternative stylesheets both for the HTML files and the XML ones. And in the CSS files I have the style for the HTML and XML elements.
HTML:
XML:
CSS: