ModelText
CSS component for .NET applications
This CSS component for .NET parses Cascading Style Sheets, and implements the CSS specificity and inheritance calculations.
The component is self-contained, written as managed code with no external dependencies.
The CSS component has 3 APIs, which you can call from your .NET applications:
For further details, see the APIs for the CSS Component.
The component's parsing is based on the Grammar of CSS 2.1.
The component's implementation embeds a formal parser (see the Acknowledgements below). Its processing degrades gracefully when it encounters any unknown CSS properties; but, it does not recover gracefully from malformed declarations and statements: instead it throws an exception (instead of parsing) if it encounters unexpected tokens. It thus obeys only some of the specified Rules for handling parsing errors.
See also this FAQ of other limitations.
License to use the ModelText CSS component for .NET (version 1.1) is as follows.
Copyright 2008-2012, Christopher Wells <info@modeltext.com> ("Licensor")
Permission to use, copy, and/or distribute this software for any purpose with or without fee is hereby granted to you, provided that you accept all the terms of this license.
You may copy and distribute this software to other parties ("third parties"), provided that the above copyright notice and this permission notice appear in all copies, and that third parties are bound by the terms of this license.
This is closed source, proprietary software. The software's source code (except for some sample code) has not been released. Although permission is hereby granted to write software which uses this software component, and to use this software as a component within other software, permission is not granted to modify this software component, nor to use nor to distribute modified copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE LICENSOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE LICENSOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Click here to download the most recent version of the ModelText CSS component.
After you download the zip file which contains the release, and unzip it, you can simply reference the
modelcssview.dll assembly from your executable: no installation is required.
The ModelCssView.dll executable depends on
version 2.0 (or greater) of the .NET framework, which must be installed before you run the utility
(it is probably installed on your machine already).
You may (but are not required to) add the assembly to the Global Assembly Cache.
Please post suggestions, and any bug reports and support issues, to the ModelText discussion group.
You can also contact the author by sending email to info@modeltext.com.
I used the GOLD Parsing System to develop the component's lowest-level API: I ported the CSS reference grammar to the format required by the GOLD parser; I then embedded the C# GOLD Parser Engine within the component, using the ILMerge utility. The GOLD parser components have a freeware license agreement. Because they are embedded using ILMerge, they are packaged within the component's DLL and require no separate installation.
The changes in the various releases are as follows (starting with the most recent).
| Date and version | Notes |
|---|---|
| 2010/12/28 version 1.1.4014.* |
New:
Fixed:
|
| 2010/11/16 version 1.1.3972.* |
New:
|
| 2010/10/26 version 1.1.3966.* |
Fixed:
|
| 2010/10/26 version 1.1.3951.* |
Fixed:
|
| 2010/09/23 version 1.1.3918.* |
Fixed:
|
| 2010/09/22 version 1.1.3917.* |
Fixed:
|
| 2010/08/10 version 1.1.3874.* |
First release. |
© 2009-2012, Christopher Wells. All rights reserved.