I didn't follow how this would work any number of levels deep.
It's ok if we only have us-gaap-ci-2html.xsl doing the basic
transformations, and a CSS stylesheet based on @class to handle things
that need to be different. Very cute.
But in fact ci is part of us-gaap which is part of the basic financial
reporting taxonomy. Acme Corp may have many operating levels
(subsidiaries, divisions, etc.). There may be more industry specific
levels between us-gaap-ci and individual companies like Acme. A
stylesheet any of these levels should be able to define behavior that
applies to all the more specific levels.
I'm not very familiar with real CSS, and maybe there's a way to inherit
behavior. But I would guess the inheritance behavior would have to be
generated somehow. How would CSS know which elements (which @classes)
inherit from each other?
Besides, I actually want the .xsl to be generating results for
conformance testing. It won't necessarilly be XHTML output subject to CSS.
Robert Koberg wrote:
...
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:lsb="http://livestoryboard.com/lsb/schemas/2003/03/config"
xmlns:c="http://livestoryboard.com/lsb/schemas/2003/03/content"
exclude-result-prefixes="c lsb">
<xsl:template match="c:*">
<div class="{local-name()}">
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</div>
</xsl:template>
</xsl:stylesheet>
This can get modified as needed, but it covers most (of our) needs. You
would then handle your unique look and feel through CSS. Of course this type
of thing just moves the problem somewhere else, but it is much easier for a
client to deal with CSS than XSL.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list