RE: [xsl] Using document()

Subject: RE: [xsl] Using document()
From: "Richard Lander" <rlander@xxxxxxxxxxxxx>
Date: Thu, 10 Oct 2002 05:11:42 -0700
 Morning,

I don't think (2) will help you. I've used .resolveExternals in the past
to allow XML files to be validated when a referenced stylesheet cannot
be found. You don't need to (and actually can not since the property no
longer exists) do this is you are using something like the
xmlValidatingReader in the .net framework. So, this is telling the
parser to just not look for stuff, which won't help you.

(1) is more of what you want, although I'm not sure of any
limitations/issues ... I'm sure that it works exactly as advertised ...

Thanks,

Rich
-----Original Message-----
From: Ben Robb [mailto:Ben@xxxxxxxxxx] 
Sent: Thursday, October 10, 2002 4:13 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx

Hmm. Doing some digging in the MSXML4 help files, you may want to look
at the a couple of methods in a bit more detail:

1. IVBSAXEntityResolver.resolveEntity

Allows the application to resolve external entities.

When ISAXEntityResolver or IVBSAXEntityResolver is implemented, the SAX
reader will call this method before opening any external entity except
the top-level document entity. External entities handled by this method
can include the following: the external DTD subset, external entities
referenced within the DTD, and external entities referenced within the
document element. The application can request that the parser resolve
the entity itself, that it use an alternative URI, or that it use an
entirely different input source.

Application writers can use the resolveEntity method to perform the
following tasks: 

- To redirect external system identifiers to secure and/or local URIs. 
- To look up public identifiers in a catalogue. 
- To read an entity from a database or other input source for example, a
dialog box. 


2. IXMLDOMDocument.resolveExternals

Boolean. The property is read/write.

When the parameter is True, external definitions are resolved at parse
time. This allows default attributes and data types to be defined on
elements from the schema and allows use of the DTD as a file inclusion
mechanism.

This setting is independent of whether validation is to be performed, as
indicated by the value of the validateOnParse property. If externals
cannot be resolved during validation, a validation error occurs. When
the value of isResolving is False, externals are not resolved and
validation is not performed.

A resolvable namespace is indicated by a namespace Universal Resource
Identifier (URI) that begins with "x-schema:" as its prefix.

The default setting is True.

This member is an extension of the World Wide Web Consortium (W3C)
Document Object Model (DOM).


Not something I've really played with, though, so not much more I can
say.

Rgs

Ben


-----Original Message-----
From: DPawson@xxxxxxxxxxx [mailto:DPawson@xxxxxxxxxxx] 
Sent: 10 October 2002 11:38
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [xsl] Using document()


Thanks Ben.

Regards DaveP.

 Worth asking.
> Not sure if it does the same thing, but VB.NET (and C#) has a 
> XmlUrlResolver.ResolveUri method.
> 
> I doubt that anything exists in VB6, though...
> 
> Rgs,
> 
> Ben
> 
> -----Original Message-----
> From: DPawson@xxxxxxxxxxx [mailto:DPawson@xxxxxxxxxxx]
> Sent: 10 October 2002 09:49
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: RE: [xsl] Using document()
> 
> 
> Robert wrote:
> > Sure, you can use a URIResolver.  I posted in a little 'howto' on 
> > this a week or so ago:
> > http://www.biglist.com/lists/xsl-list/archives/200210/msg00019.html
> > 
> > URIResolvers are a Good Thing :)
> 
> I'm working with an organisation looking for the same thing
> in Vb.  The
> app is run from directory A, the file and stylesheet are in different
> locations, and the person writing the VB is complaining that the
> document() functions are falling over.
> 
> Has the world of VB woken up to uriResolvers yet please?
>   Any hints anyone please?
> 
> [use java has already been suggested - by me :-) ]
> 
> regards DaveP
> 

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread