- From: Bjoern Hoehrmann <derhoermi@gmx.net>
- Date: Tue, 01 Jun 2004 09:21:37 +0200
- To: www-archive@w3.org
- Message-ID: <40bc2e57.839236568@smtp.bjoern.hoehrmann.de>
Hi,
/*
cssanno.c -- annotate XML documents with CSS declarations
Usage:
cssanno file.xml file.css
cssanno takes an XML document and a CSS style sheet and
annotates the elements with new attributes representing
the style declarations for the current element. Example:
<?xml version='1.0' encoding='utf-8'?>
<foo><bar/><baz/></foo>
with a style sheet
foo { display: block }
bar { color: red }
baz { font-family: "Arial Unicode MS" }
*:first-child { white-space: normal }
would result in an XML document like
<?xml version="1.0" encoding="utf-8"?>
<foo xmlns:css = "http://example.org/css#"
css:display = "block"
css:white-space = "normal">
<bar css:color = "red"
css:white-space = "normal" />
<baz css:font-family = ""Arial Unicode MS"" />
</foo>
Copyright (c) 2004 Bjoern Hoehrmann <bjoern@hoehrmann.de>.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
$Id$
*/
regards.
Attachments
- text/plain attachment: cssanno.c
Received on Tuesday, 1 June 2004 03:21:59 UTC