[xsl] providing intellisense using DTD/schema

Subject: [xsl] providing intellisense using DTD/schema
From: omprakash.v@xxxxxxxxxxxxx
Date: Fri, 1 Apr 2005 20:42:27 +0530
           Sometime ago there was a consensus here in the list that schema
files may be used to provide intellisense support while editing. Can
somebody suggest me an algorithm to provide intellisense from either a DTD
and/or a schema. Would doing for one (DTD/schema) make doing for the other
(Schema/DTD) easier.

The biggest problem I see in this is determining the context node from a
flat structure that you get when a file is loaded into a text editor. An
idea that has occurred to me is to get the current caret position and
compute the sum of lengths of all the nodes starting from the root of a dom
tree until you reached the node that caused the sum to become greater than
the caret position. But first I thought I would check and see if a better
way existed. Also, this would mean that nodes far away from the beginning
of the document would take longer to compute the sum and hence the time
taken for intellisense would be more.

I think the intellisense popup has to appear reasonably fast for it to be
effective and I was wondering if a more direct way existed maybe using the
xsl:key function.

This is probably out of topic for this list but I have high regard for the
kind of discussions being carried on here and if there existed some place
where I could find an answer,  then this would be one of those places.

Any help would be most appreciated and I will make sure I give credit to
the person if I succeed.


This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only. 
If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited.

Visit Us at http://www.polaris.co.in

Current Thread