cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@daou.co.kr
Subject a question
Date Wed, 16 Aug 2000 05:55:38 GMT
The output from a source that has a import statement is different from one from a source without
the stamement.
The imported file, lwcsehead2.xsl is not relevant to importing file. There are variables in
the imported file.
The second output is what I wanted.
How can I get the second output with import statement?


===============================================================================
output with <xsl:import href="lwcsehead2.xsl"/>
-------------------------------------------------------------
count test 
0
node set test


economics TEST Kim P PROF Lee S STUD first project 1 

===============================================================================
output without <xsl:import href="lwcsehead2.xsl"/>
-------------------------------------------------------------
count test 
3
node set test
information

economics TEST Kim P PROF Lee S STUD first project 1 

================================================================================
lwsample2.xsl
--------------------------------------------------------------------------------
<?xml version="1.0" encoding="euc-kr"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0" 
xmlns:lwhead2="headinfo.uri"
exclude-result-prefixes="lwhead2"
>

<xsl:import href="lwcsehead2.xsl"/>

<lwhead2:items>
<lwhead2:item>home</lwhead2:item>
<lwhead2:item>information</lwhead2:item>
<lwhead2:item>statistics</lwhead2:item>
</lwhead2:items>

<xsl:template match="lwml">
<xsl:processing-instruction name="cocoon-format">
type="text/html/loose"
</xsl:processing-instruction>
<html>
<body> 
count test <br/>
<xsl:value-of select="count(document('')//lwhead2:items/lwhead2:item)"/><br/>
node set test<br/>
<xsl:value-of select="document('')//lwhead2:items/lwhead2:item[2]"/><br/>
<br/>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
==============================================================================
lwsample.xml
------------------------------------------------------------------------------
<?xml version="1.0" encoding="euc-kr"?>
<?xml-stylesheet href="lwsample2.xsl" type="text/xsl"?>
<?cocoon-process type="xslt"?>
<lwml>

 <course>
    <name>economics</name>
    <code>TEST</code>
 </course>

 <user>
    <name>Kim</name>
    <kind>P</kind>
    <id>PROF</id>
 </user>

 <user>
    <name>Lee</name>
    <kind>S</kind>
    <id>STUD</id>
 </user>

 <project>
  <name>first project</name>
  <no>1</no>
 </project>

</lwml>
==================================================================================
Mime
View raw message