I'm trying to use Axkit (actually, the XPathScript component) to process existing XHTML files. I've having trouble with the parser complaining about external entities when it was trying to fetch DTD referenced in the DOCTYPE:
500 Can't connect to www.w3.org:80 (Bad hostname 'www.w3.org') http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd Handler couldn't resolve external entity at line 2, column 120, byte 166 error in processing external entity reference at line 2, column 120, byte 166: <?xml version="1.0" encoding="iso-8859-1" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> =======================================================================================================================^ <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/a_basic.dwt" codeOutsideHTMLIsLocked="false" -->
I found that I can instruct Expat to ignore external references by modifying the default parser used in the XPS file
my $my_parser = new XML::Parser(noExpand=>1,) ; $_[0]->{xp}->set_parser($my_parser) ;
When I diff the files, I found out that all the entities are stripped form the code (with the exception of &). That included items like and ©, ...
Is there any quick solution for this ?
Follow up questions:
My ultimate goal is to allow web site designers to use custom tags that I will be developing - without exposing them to perl (similar to the JSTL taglib concept). Is there a way to make axKit less strict and allow it to process files which are not fully XML compliant. Any other solutions that I can use ?
Thanks in advance, Yair Lenga
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]