You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by Scott Sharkey <ss...@linuxunlimited.com> on 2010/01/12 20:36:52 UTC

Function getUnparsedEntityNData()?

Hello All,

I've been handed an old xslt conversion program, and asked to make it 
work on Linux (originally compiled for SCO or TRU64 I think).  The make 
file with it specified Xalan_C_1_5_0 as the xalan lib, but I have not 
been able to find that specific version online in the archives (just 
xalan_c_1_5).

Compiling fails on the following line:

    const XalanDOMString& ndata =
              executionContext.getUnparsedEntityNData(name, *doc);

where executionContext is a parameter to the function, defined thus:

   XPathExecutionContext&      executionContext,

name is

   const XalanDOMString& name = arg->str();
          (arg is a passed pointer to an XObject)

and doc is
   XalanDocument* const doc = XalanNode::DOCUMENT_NODE ==
        context->getOwnerDocument()


It is saying that there is no getUnparsedEntityNData() function.  I have 
searched google and the archives for info about this call, but am 
getting nothing.  Was there such a function, perhaps now deprecated or 
refactored?  Any assistance would be greatly appreciated!

-Scott


Re: Function getUnparsedEntityNData()?

Posted by David Bertoni <db...@apache.org>.
On 1/12/2010 11:36 AM, Scott Sharkey wrote:
> Hello All,
>
> I've been handed an old xslt conversion program, and asked to make it
> work on Linux (originally compiled for SCO or TRU64 I think). The make
> file with it specified Xalan_C_1_5_0 as the xalan lib, but I have not
> been able to find that specific version online in the archives (just
> xalan_c_1_5).
We've never released a version of Xalan-C called 1.5.0, so it would have 
to be 1.5, which you probably found in the archives:

http://archive.apache.org/dist/xml/xalan-c/source/

>
> Compiling fails on the following line:
>
> const XalanDOMString& ndata =
> executionContext.getUnparsedEntityNData(name, *doc);
To my knowledge (and I'm the original author of Xalan-C), there has 
never been a function by this name. Perhaps the source code was modified 
and it was added? You might want to see if you can get Xalan-C source 
code that was used to build this application.

>
> where executionContext is a parameter to the function, defined thus:
>
> XPathExecutionContext& executionContext,
>
> name is
>
> const XalanDOMString& name = arg->str();
> (arg is a passed pointer to an XObject)
>
> and doc is
> XalanDocument* const doc = XalanNode::DOCUMENT_NODE ==
> context->getOwnerDocument()
>
>
> It is saying that there is no getUnparsedEntityNData() function. I have
> searched google and the archives for info about this call, but am
> getting nothing. Was there such a function, perhaps now deprecated or
> refactored? Any assistance would be greatly appreciated!
Since I don't understand what this function was supposed to accomplish, 
it's difficult to say how you can work around it. Perhaps the "N" in the 
name refers to a notation in the DTD:

http://www.w3.org/TR/REC-xml/#dt-notation

If that's the case, you can use the following function:

virtual const XalanDOMString&
XPathExecutionContext::getUnparsedEntityURI(
         const XalanDOMString&   theName,
         const XalanDocument&    theDocument) const = 0;

This assumes the "data" for an unparsed entity is the URI from the 
notation in the DTD. This function might also be designed to deference 
the URI, assuming it's a URL, and return the data from the entity, but 
that seems unlikely to me.

Perhaps if you can provide more information about how the ndata variable 
is used, that might help.

Dave