Sent by Jamie Peloquin on 19 February 2003 14:02
>I have to be able to generate the html
>
><style type = "text/css">
> @import url(.../aPathToAStyleSheet)
></style>
>
>However I'm told that XSL can't handle the "@". It seems to me that there
>must be a way to escape that character, but I know nothing of XSL.
>
>Is there some way to get this particular string generated from an XML
>document using XSL?
As long as the "@" is not in the XML/XSL tag itself, you should be okay.
The "@" is used to start a rule (like @import itself is a rule). Here's an
example:
In your XML:
<root>
<person>
<email>
[EMAIL-REMOVED]
</email>
</person>
</root>
In your XSL:
<xsl:template match="person">
<div>
<xsl:if test="email != ''">
<xsl:apply-templates select="email"/>
</xsl:if>
</div>
</xsl:template>
Just remember that you will need to enclose your "@import" in CDATA
becuase you would be generating XHTML (at least the XSL template will be).
<style>
/* <![CDATA[ */
@import url(.../aPathToAStyleSheet)
/* ]]> */
</style>
Good luck!
======================================
Jamie Peloquin www.dockingbay-94.com