So are you saying for documents with no DTD we should continue processing as we do in LibLouisUTDML or should we maintain the whitespace when parsing the XML?
Michael Whapples On 21/05/2014 10:46, Keith Creasy wrote:
Michael. I think a document without a DTD or schema is going to always be a bit dicy. We basically have to rely on the creator of the XML to do it right and not put in extraneous white space. Fortunately the documents we deal with for our Braille book production require a DTD or schema so we should be OK. Other documents, without a DTD or schema, are likely to be imperfect. We can compress white space and that should at least make the impact minimal. I suggest we proceed as if we always had a DTD or schema and deal with exceptions as they occur. Setting environment variables sounds fine. We probably can't avoid it. -----Original Message----- From: liblouis-liblouisxml-bounce@xxxxxxxxxxxxx [mailto:liblouis-liblouisxml-bounce@xxxxxxxxxxxxx] On Behalf Of Michael Whapples Sent: Wednesday, May 21, 2014 5:39 AM To: liblouis-liblouisxml@xxxxxxxxxxxxx Subject: [liblouis-liblouisxml] Re: LibLouisUTDML and validating documents Hello, Yes enabling internet access in liblouisutdml seem to sort out the problem. I think I now have information for how to deal with this without internet access, just one small question remaining which possibly we can work around anyway if we are prepared to use environment variables. The only other questionable thing is how to deal with documents without a DTD declaration, which thus will not be validated. Is this a liblouisutdml question or something for in BrailleBlaster (IE. its wrong to give liblouisutdml a document which cannot be validated, BrailleBlaster being the user facing application should alert the user to this issue and help the user resolve the problem). Michael Whapples On 21/05/2014 10:31, Keith Creasy wrote:We are using "system" DTD's and so internet access should not be required. We do need LibXml2 to validate even without internet access if a system DTD or schema is declared. This probably explains some of our difficulties. Can we perhaps try setting internet access to yes and then see what happens. Note that we know that people are going to use BrailleBlaster in settings, such as prison Braille programs, where internet access is not possible. Keith -----Original Message----- From: liblouis-liblouisxml-bounce@xxxxxxxxxxxxx [mailto:liblouis-liblouisxml-bounce@xxxxxxxxxxxxx] On Behalf Of John J. Boyer Sent: Wednesday, May 21, 2014 5:18 AM To: liblouis-liblouisxml@xxxxxxxxxxxxx Subject: [liblouis-liblouisxml] Re: LibLouisUTDML and validating documents If internetAccess is no but the document contains a DTD it is certainly possible to check whether the DTD refers to a local copy. Originally, liblouisutdml was not meant to validate documents. There may be a call in libxml2 to check for an accessible DTD. Since libxml2 handles documents with no DTD it is obviously not validating in that case. There are also calls to handle schemas. John On Wed, May 21, 2014 at 09:22:43AM +0100, Michael Whapples wrote:Hello, In trying to deal with some whitespace handling issues I have found that libxml2 can be affected by whether validation of the document is done. As far as I can tell, liblouisutdml will only get libxml2 to do validation if the setting: internetAccess yes is set. My question is, is there any way to let libxml2 do any document validation if there is no internet access? Would it be possible to use a local cache of the DTD or schema? I am assuming that if a document has no DTD declaration then this ends up being processed as if validation is not done, even if internetAccess is yes. What I mean by that is, does libxml2 when it fails to find a DTD, does it process with no validation? Michael Whapples For a description of the software, to download it and links to project pages go to http://www.abilitiessoft.com-- John J. Boyer; President, Chief Software Developer Abilitiessoft, Inc. http://www.abilitiessoft.com Madison, Wisconsin USA Developing software for people with disabilities For a description of the software, to download it and links to project pages go to http://www.abilitiessoft.com For a description of the software, to download it and links to project pages go to http://www.abilitiessoft.comFor a description of the software, to download it and links to project pages go to http://www.abilitiessoft.com For a description of the software, to download it and links to project pages go to http://www.abilitiessoft.com
For a description of the software, to download it and links to project pages go to http://www.abilitiessoft.com