473,790 Members | 2,850 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why does this work? (xhtml? custom html?)

Im hoping someone can help me understand why this works?

Requirement:
Navigate DOM through javascript to perform DHTML actions.

Issue:
GIANT html document, up to 4MB in size, thousands and thousands of
table rows.

What didn't work:
1) Tried to figure out if I could load the HTML into a XML parser
through javascript. The I could use a XPath statement to quickly
navigate to the nodes of interest. Couldn't find a way to do this, is
it even possible? I would be interested in knowing...

2) Tried custom tags, such as <mytag> to logically divide up the HTML.
I was able to get a reference to these tags through the DOM, but
whenever I tried to get the custom tag's child nodes I would always
get nothing. Why is this?

What did work:
Adding "xmlns=somethin g" to the "html" tag, and then using
<something:myta g> for my custom tags.

Does anyone know why this worked when normal custom tags didn't work?

I'm glad it works, but I would be interested in knowing why it works
:) .
Jul 20 '05 #1
2 3729
On 12 Jul 2003 10:44:14 -0700, cm**@walshgroup .com (Chris) wrote:
Adding "xmlns=somethin g" to the "html" tag, and then using
<something:myt ag> for my custom tags.
Surely xmlns:foo="some thing" and <foo:mytag> ?
Does anyone know why this worked when normal custom tags didn't work?


I presume that by "worked" you mean "IE ran it at least once without
barfing". I suspect that the presence of namespace non-HTML elements
causes them to be handled differently in the DOM (maybe loaded into a
parallel XML-like DOM). You're way off the standards track here, and
into the Seattle banjo country.
4MB sucks as HTML. Far too big, and you'll get timeouts.

I've done very similar stuff to this in the past, but I went with XML
data islands. Yes, it's IE-dependent, but like most of my work, this
was an intranet. Rather than loading my squiggabyte of data into the
HTML in-line, I loaded it through an XML DOM ActiveX object, created
from JScript on the page (NB - not the <XML> element).

Eventually I went to a load-on-demand architecture for this, where I
loaded chunks of tree as needed (it drove a hierarchy browser). I had
something like 20MB of potential XML, but rarely needed more than
100K. For initial building while I coded the interface though, I just
loaded the whole XML dataset at startup.
Jul 20 '05 #2
Andy Dingley <di*****@codesm iths.com> wrote in message news:<jc******* *************** **********@4ax. com>...
On 12 Jul 2003 10:44:14 -0700, cm**@walshgroup .com (Chris) wrote:
Adding "xmlns=somethin g" to the "html" tag, and then using
<something:myt ag> for my custom tags.
Surely xmlns:foo="some thing" and <foo:mytag> ?

Yea, I mistyped.. I have been using: <html xmlns:costrepor t>.

Does anyone know why this worked when normal custom tags didn't work?
I presume that by "worked" you mean "IE ran it at least once without
barfing". I suspect that the presence of namespace non-HTML elements
causes them to be handled differently in the DOM (maybe loaded into a
parallel XML-like DOM). You're way off the standards track here, and
into the Seattle banjo country.

I figured this was probably something weird. I can't really find any
documentation about what is going on. I can locate custom elements in
the HTML DOM just fine, without putting in xmlns:asdf in the HTML tag,
but if I get a reference to a custom element in javascript, and try to
have it return its childNodes, I get nothing.


4MB sucks as HTML. Far too big, and you'll get timeouts.
4MB is probably the most extreme case. A more realistic size would be
1MB.

Will the browser time out, even if it is getting a steady stream of
HTML coming down?
I've done very similar stuff to this in the past, but I went with XML
data islands. Yes, it's IE-dependent, but like most of my work, this
was an intranet. Rather than loading my squiggabyte of data into the
HTML in-line, I loaded it through an XML DOM ActiveX object, created
from JScript on the page (NB - not the <XML> element).

So you instantiated an instance of the MSXML parser from Javascript,
loaded a remote XML document, and then had it write out the HTML you
wanted (document.write or foo.innerHTML = xdoc.something right?)?

I considered doing something like this as well, and if I could start
from scratch this is probably how I would do it. Or, maybe just pass
down an XML document with an associated XSLT that would make the page
look like we want.

BTW, this is an intranet thing too, so we can be IE-Dependent as well.

Eventually I went to a load-on-demand architecture for this, where I
loaded chunks of tree as needed (it drove a hierarchy browser). I had
something like 20MB of potential XML, but rarely needed more than
100K. For initial building while I coded the interface though, I just
loaded the whole XML dataset at startup.

At first I built a totally awsome server side app to do this project.
It would load stuff on demand and display the data in a hierarchical
manner, and would cache the data on the server to ensure a minimal
number of trips to the database. It was truly awsome, and I couldn't
have been more proud of it. However, the powers that be wanted to see
all the data, not just some of it.
Do you know how long would it take to load a 1MB XML document into an
XML Parser running in Javascript (best guess)? 1 second? 5 seconds?
more?

I'm SURE that if we were to send the data as XML to the clients
browser, and cut out all the unnecessary HTML, we could make the size
of the document 1/4 as big, if not even smaller as you could do stuff
like changing <mycustom:proje ct> tags into <m:p>, and stuff like <td
class="NoBorder TD" colspan="3">&nb sp;</td> which are repeated a ton of
times would be programmed into the code or XSLT once.

Man that would kick ass... There is a little more pressure to get
something done here, than to really do something of the upmost
quality/performance. Quick and dirty wins the race I guess.
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3273
by: Eric Anderson | last post by:
I am trying to use XSLT to extend XHTML so that I can have custom widgets. For example I have a calendar control. Whenever I put the following in the psudo-XHTML doc: <calendarbox name="mycal"/> I get a nice xhtml text box with a calendar icon beside it. When the calendar icon is clicked a calender pops up to allow the user to choose the date. Then the value chosen is stuck in the xhtml text field and can be submitted with the form. I...
59
4781
by: Philipp Lenssen | last post by:
I've tested some of the new Nokia 6600 functionality. It ships with WAP2 and XHTML Support (it says). What it does is check the Doctype -- if it's not the XHTML Mobile Profile Doctype, but a XHTML1.0 Strict one, the media-handheld CSS is _ignored_. Only with the Nokia Doctype, the CSS is used. I find this really annoying as it goes against the whole idea of media-independent XHTML Strict along with stylesheets. On the good side, WML...
35
4644
by: The Bicycling Guitarist | last post by:
My web site has not been spidered by Googlebot since April 2003. The site in question is at www.TheBicyclingGuitarist.net/ I received much help from this NG and the stylesheets NG when updating the code before then. My host's tech guy just sent me the following. Isn't it okay to specify UTF-8 as the charset in the HTTP headers at the server level? Isn't it okay to have validated XHTML 1.0 strict code? ...
44
2836
by: rhythmace | last post by:
W3C HTML validator passes this: .... <script type="text/javascript" src="foo.js"> <script type="text/javascript"> ....script in here... </script> ....
3
2029
by: Mark Leistner | last post by:
I am having problems getting a gridview to bind to custom objects under any non-full trust level. I created a test project to verify what I am seeing isn't a side effect of other code in my project and I get the same errors there: Exception Details: System.Security.SecurityException: That assembly does not allow partially trusted callers.
3
1659
by: Rolf Welskes | last post by:
Hello, this is a hint only. If you make a custom control for example witch generates code <div......</div> and I put such a control in a page then in html-view of the aspx-file I could write
13
3563
by: Bob Jones | last post by:
Here is my situation: I have an aspx file stored in a resource file. All of the C# code is written inline via <script runat="server"tags. Let's call this page B. I also have page A that contains some javascript code that calls window.open. I pass the resource url of page B to Page A's window.open call. Page B is then loaded and executed but none of the server-side code is rendered. If I view the source of the page, the code (and page...
0
3364
by: mk189 | last post by:
Hi, I am trying to create XML schema of custom markup language, enriched by XHTML. In simplified version, the XML documet could look like that: <a:alarm-manual xmlns:a="alarm-manual" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="alarm-manual alarm-manual.xsd" <h:p>Text ... <a:par-value name="myName"/... text </h:p>
1
3337
by: Jahamos | last post by:
Background: I have copy and pasted an Excel flowchart into a Dreamweaver html page. I created a frame on the top of the page as a viewer. I created hotspot links over the flowchart items. Each hotspot link should open a new anchor link in the top frame which references a different webpage. Problem: It works fine in Firefox. When clicking on the hotspots I get the appropriate html page anchor link to reference my html page and it correctly...
0
9666
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10413
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10145
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9986
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7530
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6769
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4094
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.