At 13.27 29/05/2002 +0200, you wrote: >Thanks again for your help. > >Now I begin to understand what the point is. The first conclusion is that >a schema file (.xsd) can not be validated as is, without adding some extra >statements. > >[...] > >3) The third and last implementation I can think of, is to combine DTD >syntax and schema syntax as you proposed in a previous message: > ><?xml version="1.0" encoding="UTF-8"?> ><!DOCTYPE xsd:schema SYSTEM "http://www.w3.org/2001/XMLSchema.dtd" [ ><!ENTITY % p 'xsd:'> ><!ENTITY % s ':xsd'> >]> ><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> >... ></schema> > >That works when validating the schema and also when validating other >documents that depend on this schema as well, but it still has one >problem. As I do not want my parser to contact remote hosts creating >socket connections, I have a custom entity resolver that provides the >parser the required DTDs or schemas. The only way that I know to get the >schema in that code is to have a cached local copy in my disk. How could I >get the built in schema inside the parser (so that I do not need to have >the cached copy)?
You can try: 1) downloading both http://www.w3.org/2001/XMLSchema.dtd and http://www.w3.org/2001/datatypes.dtd 2) embedding these files in a char* static buffer in your code 3) and then writing a custom entity resolver that traps the requests for these files and returns a MemBufInputSource object built around the static buffers Alberto ------------------------------- Alberto Massari eXcelon Corp. http://www.StylusStudio.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
