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 Borislav Stoyanov <BS...@dspace.de> on 2005/10/21 17:25:29 UTC

Xalan-C++ 1.4 / Xerces C++ 2.1 Problem with paths containing '#'

Hello there,

could be possible, that the above versions have problems with path names containg a '#' character ?

For example

Y:\My#Path\MyFile.xsl

By trying opening it XalanTransformer.compileStylesheet(	pStylesheetSourceC,
                                                     		pCompiledStylesheetC);

throws an error.

Is there any workaround?

10nx for any help advice in advance.

Best regards,

Re: Xalan-C++ 1.4 / Xerces C++ 2.1 Problem with paths containing '#'

Posted by David Bertoni <db...@apache.org>.
Borislav Stoyanov wrote:
> Hello there,
> 
> could be possible, that the above versions have problems with path names containg a '#' character ?
> 
> For example
> 
> Y:\My#Path\MyFile.xsl
> 
> By trying opening it XalanTransformer.compileStylesheet(	pStylesheetSourceC,
>                                                      		pCompiledStylesheetC);
> 
> throws an error.
> 

This should be more explicitly documented, but you have to provide
something that is either a valid URL, or can be converted to one by
prepending "file://". Since '#' is a special character in URLs, the 
parser thinks the part after the '#' is a fragment identifier.  Note 
that this is Xerces-C++ that's reporting this error, and Xalan-C++ has 
no control over the behavior.

> Is there any workaround?
> 

Yes.  Use a std::ifstream, instead of providing the file name, when you 
construct the InputSource for XalanTransformer::compileStylesheet().

Dave