Пример #1
0
InputSource SourceFromStream(const char8 *description, FILE *file)
{
    Entity e;

    e = NewExternalEntity("",0,description,0,0);
    if(!strchr8(description, '/'))
	EntitySetBaseURL(e, default_base_url());
    
    return NewInputSource(e, MakeFILE16FromFILE(file, "r"));
}
Пример #2
0
InputSource SourceFromFILE16(const char8 *description, FILE16 *file16)
{
	Entity e;

	e = NewExternalEntity(0, 0, description, 0, 0);
	if(!strchr8(description, '/'))
	{
	char8 *base = default_base_url();
	EntitySetBaseURL(e, base);
	Free(base);
	}

	return NewInputSource(e, file16);
}