You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Neale Upstone (JIRA)" <xa...@xml.apache.org> on 2009/09/28 18:01:17 UTC

[jira] Created: (XALANJ-2506) DTMNodeProxy doesn't implement getDocumentURI() nor getBaseURI()

DTMNodeProxy doesn't implement getDocumentURI() nor getBaseURI()
----------------------------------------------------------------

                 Key: XALANJ-2506
                 URL: https://issues.apache.org/jira/browse/XALANJ-2506
             Project: XalanJ2
          Issue Type: Bug
      Security Level: No security risk; visible to anyone (Ordinary problems in Xalan projects.  Anybody can view the issue.)
          Components: DTM
    Affects Versions: 2.7.1
            Reporter: Neale Upstone


As a developer writing EXSLT extensions, I want to be able to use the document URI.

It should be possible to do the following:
    public static String baseUri(ExpressionContext context, NodeList nodes){
        Document ownerDocument = nodes.item(0).getOwnerDocument();
        return document.getDocumentBaseURI();
    }

or

    public static String baseUri(ExpressionContext context, NodeList nodes){
        return nodes.item(0).getBaseURI();
    }

But neither work.

What does work is:

    public static String baseUri(ExpressionContext context, NodeList nodes){
        Document ownerDocument = nodes.item(0).getOwnerDocument();
        DTMNodeProxy proxy = (DTMNodeProxy) ownerDocument;
        return proxy.getDTM().getDocumentBaseURI();
    }

Surely the DTM proxy should be able to at least provide me with the document base URI as the implementation in the interface.

The current implementation always returns null for getBaseURI(), and for getDocumentURI() returns a value that, it seems should be initialised in the constructor to getDTM().getDocumentBaseURI()
  


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org