  | |  | setSystemId not recursive for included stylesheets? | setSystemId not recursive for included stylesheets? 2003-02-06 - By Martin Gainty
<html><div style='background-color:'><DIV> <P>Phillip-<BR>the solution seems to be a merge of the 2 Stylesheets into 1<BR >e.g.<BR><BR><FONT size=2><xsl:apply-templates> and <xsl:apply-imports > tags are for<BR>including multiple XSLs in one.<BR><BR>suppose you have style sheets a.xsl and b.xsl defining different<BR>templates:<BR><BR><!-- a .XSL --><BR><?xml version="1.0"?><BR><xsl:stylesheet version="1.0" <BR>xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><BR><xsl:template match="abc"><BR><!-- some transformation --><BR></xsl:template> <BR></xsl:stylesheet><BR><BR><!-- b.XSL --><BR><?xml version="1.0 "?><BR><xsl:stylesheet version="1.0"<BR>xmlns:xsl="http://www.w3.org/1999 /XSL/Transform"><BR><xsl:template match="xyz"><BR><!-- some transformation --><BR></xsl:template><BR></xsl:stylesheet><BR> <BR>both can be combined in a single stylesheet using import /<BR>include directives:<BR><BR><!-- c.XSL --><BR><?xml version="1.0"?><BR>< ;xsl:stylesheet version="1.0"<BR>xmlns:xsl="http://www.w3.org/1999/XSL/Transform "><BR><xsl:import href="a.xsl"/><BR><xsl:include href="b.xsl"/> <BR></xsl:stylesheet><BR><BR>c.XSL sort of acts like an aggregation of stylesheets a.XSL and<BR>b.XSL. so the foll statement stands:<BR><BR>XML(1) + XSL(1) --> XML(1)<BR><BR>where the single stylesheet itself is composed of multiple<BR>stylesheets:<BR><BR>XSL(1) + XSL (1) + .. + XSL (1) --> XSL (1) <BR><BR>the big advantage is modularizing stylesheets.<BR><BR>the difference is 2 directives ( import/include ) is precedence<BR>of template rules in case of conflicts. this is a big topic and<BR>you may take a look at<BR></FONT><A href= "http://www.arbortext.com/xsl/tutorial/foil26.html"><FONT size=2>http://www .arbortext.com/xsl/tutorial/foil26.html</FONT></A><BR><BR>reprised from <A href= "http://forum.java.sun.com/thread.jsp?forum=34&thread=68850">http://forum .java.sun.com/thread.jsp?forum=34&thread=68850</A> by rohitd<BR><BR >Hope this helps,</P></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV><FONT face="Lucida Handwriting, Cursive" color=#000000 size=4>Martin Gainty<BR><FONT face="Verdana, Geneva, Arial, Sans-serif" size=3></DIV> <DIV></DIV> <DIR><FONT color=#0000ff size=1> <DIV></DIV> <P>______________________________________________</FONT><FONT face=Arial size=1 ><B><FONT face=Arial size=2></FONT></B></FONT></P> <DIV></DIV> <P><FONT face=Arial size=1><B><FONT face=Arial size=2>Disclaimer and confidentiality note</B></FONT></FONT></P> <DIV></DIV> <P><FONT face=Arial size=1><FONT face=Arial size=2>Everything in this e-mail and any attachments relating to the official business of Laconia Data Systems< /FONT><FONT face=Arial color=#0000ff size=2> </FONT><FONT face=Arial size=2>(LDS ) is proprietary to the company. It is confidential, legally privileged and protected by law. </FONT><FONT face=Arial color=#0000ff size=2><FONT color =#000000>LDS</FONT> </FONT><FONT face=Arial size=2>does not own and endorse any other content. Views and opinions are those of the sender unless c <DIV></DIV> <DIV></DIV> <DIV></DIV> <DIV></DIV>>From: "Rhodes, Phillip C." <PHILLIP.RHODES@(protected)> <DIV></DIV>>To: "'xalan-j-users@(protected)'" <XALAN-J-USERS@(protected) .ORG> <DIV></DIV>>Subject: setSystemId not recursive for included stylesheets? <DIV></DIV>>Date: Thu, 6 Feb 2003 16:18:06 -0500 <DIV></DIV>>MIME-Version: 1.0 <DIV></DIV>>Received: from apache.org ([208.185.179.12]) by mc1-f36.law16 .hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Thu, 6 Feb 2003 13:18:33 -0800 <DIV></DIV>>Received: (qmail 20762 invoked by uid 500); 6 Feb 2003 21:17:58 -0000 <DIV></DIV>>Received: (qmail 20727 invoked from network); 6 Feb 2003 21:17 :57 -0000 <DIV></DIV>>Received: from noaadc-msw03.noa.alcoa.com (147.154.9.220) by daedalus.apache.org with SMTP; 6 Feb 2003 21:17:57 -0000 <DIV></DIV>>Received: from noaadc-mxi03.NOA.Alcoa.com (unverified) by NOAADC -MSW03.NOA.Alcoa.com (Content Technologies SMTPRS 4.2.10) with ESMTP id <T604056CE82939A09DC45C@(protected)>for <XALAN-J-USERS@(protected) .ORG>; Thu, 6 Feb 2003 16:18:11 -0500 <DIV></DIV>>Received: by noaadc-mxi03.NOA.Alcoa.com with Internet Mail Service (5.5.2653.19)id <DS7HG6BF>; Thu, 6 Feb 2003 16:18:11 -0500 <DIV></DIV>>X-Message-Info: dHZMQeBBv44lPE7o4B5bAg== <DIV></DIV>>Mailing-List: contact xalan-j-users-help@(protected); run by ezmlm <DIV></DIV>>Precedence: bulk <DIV></DIV>>list-help: <mailto:xalan-j-users-help@(protected)> <DIV></DIV>>list-unsubscribe: <mailto:xalan-j-users-unsubscribe@(protected) .org> <DIV></DIV>>list-post: <mailto:xalan-j-users@(protected)> <DIV></DIV>>Delivered-To: mailing list xalan-j-users@(protected) <DIV></DIV>>Message-ID: <F5404180FA3C3942AFB38E30F2E553B1038BF79B@(protected) -MXU16.NOA.ALCOA.COM> <DIV></DIV>>X-Mailer: Internet Mail Service (5.5.2653.19) <DIV></DIV>>X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N <DIV></DIV>>Return-Path: xalan-j-users-return-2941-mgainty=hotmail.com@(protected) .apache.org <DIV></DIV>>X-OriginalArrivalTime: 06 Feb 2003 21:18:33.0767 (UTC) FILETIME= [4E022370:01C2CE25] <DIV></DIV>> <DIV></DIV>>I am doing a transformation in jaxp, underlying it is xalan 2.4 .1 <DIV></DIV>> <DIV></DIV>>I have several stylesheets, all have includes that are relative to a base <DIV></DIV>>(e.g. /usr01/h3/rhodepc/d/jrun-16981/default-app/) There is an xsl <DIV></DIV>>subdirectory here. <DIV></DIV>> <DIV></DIV>>All my includes in my stylesheets begin with the path "xsl/" <DIV></DIV>> <DIV></DIV>>I have a master stylesheet, that will include one stylesheet, which in turn <DIV></DIV>>includes another stylesheet, and so on... <DIV></DIV>> <DIV></DIV>>I set the systemId on the first stylesheet, so that when it does an include <DIV></DIV>>of the first stylesheet, the stylesheet is found. <DIV></DIV>> <DIV></DIV>>However, this second stylesheet does an include (also relative). This <DIV></DIV>>include is resolved relative to the second stylesheet's location , not the <DIV></DIV>>original location of the stylesheet, hence the document root moves from <DIV></DIV>>stylesheet to stylesheet. <DIV></DIV>> <DIV></DIV>>It seems that setSystemId is not used recursively for resolving the <DIV></DIV>>stylesheets that are included... <DIV></DIV>> <DIV></DIV>>Any help and guidance would be appreciated! <DIV></DIV>> <DIV></DIV>>Here is more detail: <DIV></DIV>>java.io.FileNotFoundException: <DIV></DIV>>/usr01/h3/rhodepc/d/jrun-16981/default-app/xsl/purchasing/xsl /util/jsp/xmlui <DIV></DIV>>.xsl (No such file or directory) <DIV></DIV>> <DIV></DIV>>The file is located at <DIV></DIV>>/usr01/h3/rhodepc/d/jrun-16981/default-app/xsl/util/jsp/xmlui .xsl <DIV></DIV>> <DIV></DIV>>The include was (in the 2nd included xsl) <DIV></DIV>> <DIV></DIV>><?xml:namespace prefix = xsl /><xsl:include href="xsl/util/jsp /xmlui.xsl"></xsl:include> <DIV></DIV>> <DIV></DIV>>I had set the systemid on the first stylesheet to point to <DIV></DIV>>"/usr01/h3/rhodepc/d/jrun-16981/default-app/" <DIV></DIV>>So the first stylesheet is found. <DIV></DIV>>The master stylesheet (the first one called) is located at <DIV></DIV>>/usr01/h3/rhodepc/d/jrun-16981/default-app/xsl/purchasing/ebiz <DIV></DIV>> <DIV></DIV>>Thanks very much. Fighting this all day! <DIV></DIV>> <DIV></DIV>> <DIV></DIV>> <DIV></DIV>>Phillip Rhodes <DIV></DIV></mailto:xalan-j-users@(protected)></mailto:xalan-j-users -unsubscribe@(protected)></mailto:xalan-j-users-help@(protected)></FONT>< /FONT></DIR></FONT></FONT></div><br clear=all><hr>MSN 8 with <a href="http://g .msn.com/8HMOENUS/2740">e-mail virus protection service: </a> 2 months FREE*< /html>
|
|
 |