[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: AVT's in xslt_processor:output doctype attribs?

Subject: Re: AVT's in xslt_processor:output doctype attribs?
From: Warren Hedley <w.hedley@xxxxxxxxxxxxxx>
Date: Mon, 22 May 2000 20:13:45 -0400
avt s make
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.