You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by bu...@apache.org on 2002/05/14 00:18:29 UTC
DO NOT REPLY [Bug 9048] New: -
Can we pass the name of the xsl to used for transformation as a parameter
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9048>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9048
Can we pass the name of the xsl to used for transformation as a parameter
Summary: Can we pass the name of the xsl to used for
transformation as a parameter
Product: Cocoon 2
Version: 2.0
Platform: Other
OS/Version: Other
Status: NEW
Severity: Blocker
Priority: Other
Component: general components
AssignedTo: cocoon-dev@xml.apache.org
ReportedBy: pkrishna@learnframe.com
Earlier, while using cocoon-I, we created a xml wrapper as below:
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>" + '\n' +
"<?xml-stylesheet href=\"" + reportName + ".xsl\" type=\"text/xsl\"?>"
+ '\n' +
"<report>" + '\n' +
"<reportDate>" + DateFormat.getDateInstance().format(new Date())
+ "</reportDate>" + '\n' +
reportDef +
"<legal>Nebo, Learnframe, Inc. are registered trademarks of Learnframe,
Inc. Powered by Learnframe.</legal>" +
"</report>";
Xsl name to be used was programmatically generated. From my reading of cocoon2,
the name of the XSL file to be used in transformation should be declared ahead
in sitemap.xmap; how would I pass in the name of the xsl file in a request
object and letting the org.apache.cocoon.transformation to use the xsl file
passed in the request object instead of what's set in the src attribute.
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
RE: Can we pass the name of the xsl to used for transformation as a parameter?
Posted by Conal Tuohy <co...@paradise.net.nz>.
Yes you can insert a processing instruction in your XML and set up Cocoon 2
to respect it.
In short, you create a "bootstrap" stylesheet which finds the stylesheet you
want, and you call it using the "cocoon:" protocol.
See http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=102003720732535&w=2
It's perhaps not an ideal system, but it works ;-)
Con
> -----Original Message-----
> From: bugzilla@apache.org [mailto:bugzilla@apache.org]
> Sent: Tuesday, 14 May 2002 10:18
> To: cocoon-dev@xml.apache.org
> Subject: DO NOT REPLY [Bug 9048] New: - Can we pass the name
> of the xsl
> to used for transformation as a parameter
>
>
> DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
> RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
> <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9048>.
> ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
> INSERTED IN THE BUG DATABASE.
>
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9048
>
> Can we pass the name of the xsl to used for transformation as
> a parameter
>
> Summary: Can we pass the name of the xsl to used for
> transformation as a parameter
> Product: Cocoon 2
> Version: 2.0
> Platform: Other
> OS/Version: Other
> Status: NEW
> Severity: Blocker
> Priority: Other
> Component: general components
> AssignedTo: cocoon-dev@xml.apache.org
> ReportedBy: pkrishna@learnframe.com
>
>
> Earlier, while using cocoon-I, we created a xml wrapper as below:
>
> "<?xml version=\"1.0\" encoding=\"UTF-8\"
> standalone=\"yes\"?>" + '\n' +
> "<?xml-stylesheet href=\"" + reportName + ".xsl\"
> type=\"text/xsl\"?>"
> + '\n' +
> "<report>" + '\n' +
> "<reportDate>" +
> DateFormat.getDateInstance().format(new Date())
> + "</reportDate>" + '\n' +
> reportDef +
> "<legal>Nebo, Learnframe, Inc. are registered
> trademarks of Learnframe,
> Inc. Powered by Learnframe.</legal>" +
> "</report>";
>
> Xsl name to be used was programmatically generated. From my
> reading of cocoon2,
> the name of the XSL file to be used in transformation should
> be declared ahead
> in sitemap.xmap; how would I pass in the name of the xsl file
> in a request
> object and letting the org.apache.cocoon.transformation to
> use the xsl file
> passed in the request object instead of what's set in the src
> attribute.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org