Print

Print


Hi Stuart,

stuart yeates wrote:
> That looks very useful Martin.
> 
> Am I correct in thinking that because CSS lacks the Sebastian's 
> variables and macros, each of those blocks should be independent---the 
> correctness of the CSS is independent of the where it occurs in the list 
> and other CSS and artefacts that may or may not appear in conjunction 
> with it after processing?

That's right. It doesn't check the logic of any cascade, just the 
syntax. But that's all I actually need. What kinds of artefacts were you 
thinking of?

Cheers,
Martin
> 
> cheers
> stuart
> 
> Martin Holmes wrote:
>> Hi Stuart,
>>
>>  > Is anyone doing anything useful in the way of validating that the CSS in
>>  > their TEI attributes is a well formed CSS fragment?
>>
>> I have this tiny XSLT stylesheet:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
>> version="2.0"
>>    xmlns:xi="http://www.w3.org/2001/XInclude"
>>      xpath-default-namespace="http://www.tei-c.org/ns/1.0"
>>      xmlns:exist="http://exist.sourceforge.net/NS/exist"
>>      exclude-result-prefixes="#all">
>>
>>    <xsl:output method="text" encoding="UTF-8" media-type="text/css" />
>>
>>    <xsl:template match="/">
>>      <xsl:for-each select="//@rend">
>>        <xsl:text>
>> .style_</xsl:text><xsl:value-of select="position()" />
>>        <xsl:text>{
>> </xsl:text>
>>        <xsl:value-of select="."/>
>> <xsl:text>
>> }
>>
>> </xsl:text>
>>      </xsl:for-each>
>>
>>    </xsl:template>
>> </xsl:stylesheet>
>>
>>
>> which runs as part of a Cocoon pipeline against any of my documents, to 
>> produce (for instance) this:
>>
>> <http://mariage.uvic.ca/xml.css?id=advis_aux_hommes_martyrisez>
>>
>> which I can pass to the Jigsaw validator like this:
>>
>> <http://jigsaw.w3.org/css-validator/validator?profile=css2&warning=2&uri=http%3A%2F%2Fmariage.uvic.ca%2Fxml.css%3Fid%3Dadvis_aux_hommes_martyrisez>
>>
>> It would be relatively easy to make it output more information about 
>> each particular class (its parent element, containing document id, etc.).
>>
>> Cheers,
>> Martin
> 
>