Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: DOCTYPE questions and problem(s) >Thread Next - Re: DOCTYPE questions and problem(s) Re: DOCTYPE questions and problem(s)To: NULL Date: 4/8/2008 5:26:00 PM Ah. I hadn't thought of a .NET solution. Thanks for that. Actually I'd come up with another solution using the HOSTS file instead. My concern is that I'm likely to encounter this or a similar problem when I start to build schemas for my documents. I'm very uncertain of my ground here - schemas is next on my todo list - but I foresee problems with targetNamespace and xmlns:mstns, for example. Martin Martin Honnen wrote: > Martin wrote: > >> The problems start when I try to work on my laptop which is frequently >> disconnected from the internet. At this point my transform .NET code >> fails again as it cannot reach www.martin.com. To solve this I've >> changed the url to http://localhost/DTD/xhtml-lat1.ent and all is well >> again. Except that the documents need to be edited - locahost replaced >> with www.martin.com - as I move back and forth from laptop to desktop. > > You might want to write a custom XmlResolver (for instance by > subclassing XmlUrlResolver) that checks for the URLs your application > accesses and makes sure that resources are fetched from a local cache if > no internet connection is available. > Then you can set the XmlResolver property of your XmlReaderSettings or > of your XmlDocument to that custom resolver. > > | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
