[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xalan-c-users
Subject:    RE: Xsl:include support - how to enable it?
From:       "David Fishburn" <fishburn () ianywhere ! com>
Date:       2003-07-30 16:54:36
[Download RAW message or body]

Much appreciated Mark, I have everything working as I need now.

Now I have to run some speed tests between the Java version and the C++
version.

Java is usually 10 times slower, so I am expecting to get some large
percentage.

Has anyone done this type of comparision already?

Thanks,
Dave

-----Original Message-----
From: Mark Weaver [mailto:mark@npsl.co.uk] 
Sent: Tuesday, July 29, 2003 12:36 PM
To: xalan-c-users@xml.apache.org
Subject: RE: Xsl:include support - how to enable it?


Here is a modified version that defines and installs an EntityResolver.
You will need to modify the resolver to suit; this one just returns a
URLInputSource for the URL:

class MyResolver : public EntityResolver {
public:
	InputSource* resolveEntity (const XMLCh* const publicId,
                                const XMLCh* const systemId)
	{
		XMLURL URL(systemId);
		return new URLInputSource(URL);
	}
};

Any rewriting that you want to take place can be performed on the URL
object.

> -----Original Message-----
> From: David Fishburn [mailto:fishburn@ianywhere.com]
> Sent: 29 July 2003 16:05
> To: 'Mark Weaver'; xalan-c-users@xml.apache.org
> Subject: RE: Xsl:include support - how to enable it?
>
>
>
> Right, but where (what directory), do I create this class in: entity 
> resolver class.
>
> Then what do I need to recompile to enable it?
>
> Thanks,
> Dave
>
> -----Original Message-----
> From: Mark Weaver [mailto:mark@npsl.co.uk]
> Sent: Monday, July 28, 2003 8:52 AM
> To: xalan-c-users@xml.apache.org
> Subject: RE: Xsl:include support - how to enable it?
>
>
>
> > After that, I am not sure how to enable the EntityResolver. I am 
> > using the following sample that I have based everything on: 
> > C:\OpenSrc\xalan\C\xml-xalan\c\samples\XalanTransformerCallback
> >
> > So I am not sure where I need to put the code to enable this. I am 
> > putting it in my XalanTransformaterCallback.cpp file?
> >
> >
> You just need to call XalanTransformer::setEntityResolver with a 
> pointer to your entity resolver class.
>
> Mark
>
>
>
>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic