04-16-2007 12:04 AM
04-16-2007 04:37 PM
04-17-2007 03:07 AM
05-01-2007 06:06 AM
however, xsl includes within the webapp should be working fine in all version.
05-02-2007 02:09 PM
05-03-2007 07:21 AM
include takes webapp relative paths, so <xs:include href="/path/within/webapp.xsl"/> should work.
<xsl:include href="/xsl/homepage_body.xsl"/>
V:\test–admin\HEAD\DATA\www\avm_webapps\ROOT\xsl\homepage_body.xsl
error regenerating homepage_new2-printable.jsp using homepage_new_printable.xsl: null
in the Web Client and the following message in the console:C:\Alfresco\dummy.xsl; Line #0; Column #0; Had IO Exception with stylesheet file: /xsl/homepage_body.xsl
file:///C:/Alfresco/dummy.xsl; Line #0; Column #0; javax.xml.transform.TransformerException: ElemTemplateElement error: homepage_body
12:05:15,007 ERROR [ui.common.Utils] error regenerating homepage_new2-printable.jsp using homepage_new_printable.xsl: null
java.lang.NullPointerException
at org.alfresco.web.forms.XSLTRenderingEngine.render(XSLTRenderingEngine.java:411)
ihowever, xsl includes within the webapp should be working fine in all version.
05-23-2007 03:59 AM
05-23-2007 03:15 PM
06-22-2007 03:37 AM
is your virtualization server up and running? this is necessary for xsl:includes to work. if it is, then the debugging information should be emitting messages as to which urls it's trying for to resolve the include. if you're still having troubles, could you attach more of the debugging output please?
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:sample="http://sample.org"
targetNamespace="http://sample.org"
elementFormDefault="qualified">
<xs:element name="including">
<xs:complexType>
<xs:sequence>
<xs:element name="title" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:sample="http://sample.org"
xmlns:fn="http://www.w3.org/2005/02/xpath-functions"
exclude-result-prefixes="xhtml xalan xsl fn">
<xsl:output method="xml" encoding="UTF-8" indent="yes"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
omit-xml-declaration="yes"
media-type="text/html"/>
<xsl:preserve-space elements="*"/>
<xsl:include href="/included.xsl" />
<xsl:template match="/">
<html>
<head>
<title><xsl:value-of select="/sample:including/sample:title" /></title>
</head>
<body>
<h1><xsl:value-of select="/sample:including/sample:title" /></h1>
<xsl:variable name="t" select="document('/included.xml')"/>
<xsl:apply-templates select="$t/sample:menu" />
</body>
</html>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:sample="http://sample.org"
xmlns:fn="http://www.w3.org/2005/02/xpath-functions"
exclude-result-prefixes="xhtml xalan xsl sample fn">
<xsl:output method="xml" encoding="UTF-8" indent="yes"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
omit-xml-declaration="yes"
media-type="text/html"/>
<xsl:preserve-space elements="*"/>
<xsl:template match="sample:menu">
<ul>
<xsl:for-each select="sample:menuItem">
<li>
<xsl:value-of select="sample:itemUrl"/>
<xsl:value-of select="sample:itemName"/>
</li>
</xsl:for-each>
</ul>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?>
<sample:menu xmlns:sample="http://sample.org">
<sample:menuItem><sample:itemName>page1</sample:itemName>
<sample:itemUrl>page1.html</sample:itemUrl>
</sample:menuItem>
<sample:menuItem>
<sample:itemName>page2</sample:itemName><sample:itemUrl>/page2.html</sample:itemUrl>
</sample:menuItem>
<sample:menuItem>
<sample:itemName>page3</sample:itemName><sample:itemUrl>/page3.html</sample:itemUrl>
</sample:menuItem>
</sample:menu>
[/img]
06-29-2007 05:59 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.