More work on xsl:attribute-set storage
Posted by mholmes on 05 Jun 2007 in Activity log
I now have the basic system working in pilot form. This is what I did today:
- Made a revision to the previous posting, after noticing that I'd omitted the comma from the list of characters which need to be substituted in the selector.
- Created a Java application which can translate CSS files into xsl:attribute-sets. This is probably not going to be required on the server itself, but Greg made the point that if it could be run from the command line, it could be called as a transformer from Cocoon, so I'll probably rewrite it as a command-line class at some stage, and have that class instantiated by the GUI app for its purposes. This took much of the day, but in the process, I learned once more about how to create a Java app, and added a very useful utility class I can use and extend in all my Java stuff.
- Created a complicated xsl:attribute-set file based on a Mariage stylesheet.
- Completed the
xsl_attribute_sets_to_css.xslfile. - Tested to make sure the transformation was working OK locally.
- Uploaded both files into the db.
- After some tweaking of the stylesheet, managed to get the sitemap set up so that it can deliver a CSS file generated from the xsl attribute set file in the db, using the transformation file also stored in the db. For the record, this is how it works:
<map:match pattern="*.css"> <map:generate src="xmldb:exist:///db/teiJournal/styles/test/{1}.xsl" /> <map:transform type="saxon" src="xmldb:exist:///db/teiJournal/xsl_trans/css/attribute_sets_to_css.xsl" /> <map:serialize type="text" /> </map:match>
This is good progress. Now I have to revisit the database structure again, and figure out what needs to be stored where.