This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: AVT's in xslt_processor:output doctype attribs?
- To: xsl-list at mulberrytech dot com
- Subject: Re: AVT's in xslt_processor:output doctype attribs?
- From: Warren Hedley <w dot hedley at auckland dot ac dot nz>
- Date: Mon, 22 May 2000 20:13:45 -0400
- Organization: Department of Engineering Science, The University of Auckland
- References: <93CB64052F94D211BC5D0010A800133101FDED3D@wwmess3.bra01.icl.co.uk>
- Reply-To: xsl-list at mulberrytech dot com
Kay Michael wrote:
>
> Seems a reasonable requirement. There's certainly no technical reason in
> Saxon why not. Perhaps you could write it and send me the code :-)
Oh what the hell. Seems to work.
Changes marked *.
public class SAXONOutput extends XSLOutput {
Expression file;
Expression userData;
* Expression doctypeSystem;
* Expression doctypePublic;
...
public void prepareAttributes() throws SAXException {
String fileAtt = getAttribute("file");
if (fileAtt != null) {
file = AttributeValueTemplate.make(fileAtt, this);
}
String userDataAtt = getAttribute("user-data");
if (userDataAtt != null) {
userData = AttributeValueTemplate.make(userDataAtt, this);
}
* String doctypeSystemAtt = getAttribute("doctype-system");
* if (doctypeSystemAtt != null) {
* doctypeSystem = AttributeValueTemplate.make(doctypeSystemAtt, this);
* }
* String doctypePublicAtt = getAttribute("doctype-system");
* if (doctypePublicAtt != null) {
* doctypePublic = AttributeValueTemplate.make(doctypePublicAtt, this);
* }
... }
public void process( Context context ) throws SAXException
{
Controller c = context.getController();
OutputDetails prev = c.getOutputDetails();
OutputDetails details = new OutputDetails(prev);
OutputManager manager = c.getOutputManager();
setDetails(details);
if (file != null) {
String outFile = file.evaluateAsString(context);
* if (doctypeSystem!=null) {
* details.setDoctypeSystem(doctypeSystem.evaluateAsString(context));
* }
* if (doctypePublic!=null) {
* details.setDoctypeSystem(doctypePublic.evaluateAsString(context));
* }
... }
--
Warren Hedley
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list