cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Cordes <>
Subject xsl:include and weird xalan behavior
Date Sun, 23 Apr 2000 03:12:47 GMT
Hello all, 2 questions...

1.	In an xsl document, how do I include other stylesheets.  I know what
	you're thinking - <xsl:include href="some_file"/>, but I'm confused 
	how exactly to do this. Should I have 2 separate well-formed 
	stylesheets? ( I assume yes ).  When i say <xsl:include...> does that 
	include the stylesheet's templates or can i use it to dump text directly
	into place.  I want to do something like apache's '#include'.

2.	I'm using xalan 1.0.1 and xerces 1.0.3 and am experiencing some strange
	behavior.  Here is a code fragment:

		<a name="{ALIAS}"></a>
		<b><xsl:value-of select="LASTNAME"/>
		<xsl:text>, </xsl:text>
		<xsl:value-of select="FIRSTNAME"/></b>	

	What I expect this to display is "<LASTNAME>, <FIRSTNAME>" , but for some 
	aggravating reason it always displays "<LASTNAME> <FIRSTNAME>,".  
	Notice that the comma is at the end !?!  Can anyone explain this 
	behavior? Or should I report it as a bug?

	Just in case I'm to blame here is the whole template:

<xsl:template match="PERSON">
                <a name="{ALIAS}"></a>
                <b><xsl:value-of select="LASTNAME"/>
                <xsl:text>, </xsl:text>
                <xsl:value-of select="FIRSTNAME"/></b>
                <xsl:apply-templates select="TITLE"/>
                <xsl:value-of select="BIOGRAPHY"/>
           <table border="0" cellspacing="0" cellpadding="0">
                <xsl:apply-templates select="PHONE"/>
                <xsl:apply-templates select="EMAIL"/>
                <xsl:apply-templates select="WWW"/>
                    <td><br/> <!-- blank row -->

Thanks for reading this


View raw message