PDA

View Full Version : Welcome to the new Technical Forum!


The Management
25-03-2003, 11:29:16
An accompanying section on the website will be launching soon.

If you would like to volunteer to post tech related news please email themanagement@counterglow.com. We only need 1 or 2 volunteers.

Have fun!

King_Ghidra
25-03-2003, 11:31:54
the coffee holder on my computer is broken, can anyone help?

Dyl Ulenspiegel
25-03-2003, 11:40:29
I've still got the cupholder software somewhere, I believe...

Funkodrom
25-03-2003, 11:40:45
Has it withdrawn into the body of the computer? If so press the "extend cup holder" button. It kind of looks like:

^
_

Funkodrom
25-03-2003, 11:41:09
But with the line closer to the arrow.

Scabrous Birdseed
25-03-2003, 11:57:17
I can't get my foot pedal working.

Funkodrom
25-03-2003, 12:31:13
Are you having a power cut?

protein
25-03-2003, 12:32:56
Is your leg in any way damaged or broken?

Funkodrom
25-03-2003, 13:26:22
Technically Ghidra wasn't the first poster here, The Management was.

MattHiggs
25-03-2003, 13:34:24
I'm trying to get some ideas together on articles that I could write.

Sean
25-03-2003, 15:57:37
How about one explaining the technically pure but hideously complex way of creating XML documents: by using the DOM. I could really use that one right now.

Funkodrom
25-03-2003, 16:45:06
What is it specifically you need to know?

Sean
25-03-2003, 16:47:16
Literally, the simplest way to go about creating multi-namespaced XML documents using the DOM, traversing the nodes and doing some fiddling with elements, then writing the file to disk.

Theoretically I can do this already, but it seems more complicated than it should be.

Sean
25-03-2003, 16:49:31
Basically I want to do it all without having to type any angle brackets. This includes creating a template to load and edit.

Funkodrom
25-03-2003, 16:56:22
What are you doing at the moment? - just to see if I can work out if I know an easier way.

Sean
25-03-2003, 17:06:12
I think I am slowly creeping towards success—I now have a processing instruction and an empty element. From there, the rest flows naturally (I hope).

Whoever said we should use tools to deal with XML and not create it in text editors obviously never used the DOM.

Sean
25-03-2003, 17:15:26
Aagh!The createAttribute method creates an Attr object of the specified name. It does not, however, add a value for that attribute. This must be done separately using the Element object's setAttribute method. An attribute so created will have a parentNode property set to null until it has been 'set' into an element.How dumb is that?

Funkodrom
25-03-2003, 17:22:32
Sounds about right. I was surprised you thought there would be an easy way to do it.

Sean
25-03-2003, 17:24:15
I have finally come up with a specific question for you: I want to declare all the namespaces for use in the document in the root element, rather than as they are used. How?

Sean
25-03-2003, 17:24:48
I am assuming that I’m not supposed to just add them as attributes. That would be silly.

Funkodrom
25-03-2003, 17:40:19
I'm not sure I understand the question, you have to declare the namespaces at the beginning of the document. eg From W3:

<?xml:namespace_name="http://books.org/schema/"_as="B"?>
<?xml:namespace_name="http://ecommerce.org/schema/"_as="E"?>
<?xml:namespace_name="http://digitalSignatures.org/schema/"_as="dsig"?>
<?namespace_name="urn:uuid:C2F41010-65B3-11d1-A29F-00AA00C14882/"_as="dt"?>
<E:ORDER>
_<dsig:DSIG>
___<MANIFEST>80183589575795589189518915</MANIFEST>
___<SIG_href="http://XYX/Joe@company.com"/>
_</dsig:DSIG>
_<E:SOLD-TO>
___<E:LASTNAME>Layman</E:LASTNAME>
___<E:FIRSTNAME>Andrew</E:FIRSTNAME>
_</E:SOLD-TO>
_<E:SOLD-ON_dt:type="date.iso8601">1997-03-17</E:SOLD-ON>
_<E:ITEM_E:PRICE="5.95">
___<B:BOOK_TITLE="Number,_the_Language_of_Science"_
___________AUTHOR="Dantzig,_Tobias"/>
_</E:ITEM>
_<E:ITEM_E:PRICE="12.95">
___<B:BOOK_TITLE="Introduction_to_Objectivist_Epistemology"
___________AUTHOR="Rand,_Ayn"/>
_</E:ITEM>
</E:ORDER>

http://www.w3.org/TR/1998/NOTE-xml-names-0119#ns-decl

Sean
25-03-2003, 17:50:27
I mean by doing so like zees:<?xml version="1.0"?>

<a:root
xmlns:a="http://purl.org/ref/a/"
xmlns:b="http://web.resource.org/ns/b/"
xmlns:c="http://somewhereelsenetirely.com/c/"
xmlns="http://w3.org/XML/ns/"
>

<b:element>
<c:emptyelement />
</b:element>

<c:element>
<c:emptyelement />
</c:element>

</a:root>

Sean
25-03-2003, 17:51:01
(Which is a vlid XML document.)

Sean
25-03-2003, 20:45:44
I did it in the end by adding them as attributes. Seems like a hack, but it works. The DOM is mine. Mwahaha.

Sean
25-03-2003, 21:59:14
I am done! The bugs are ironed out, the code is messy, and I still don’t really know my way around the DOM, especially as I used MS-specific extensions.

Darkstar
25-03-2003, 22:53:07
Humm... I saw this last night, when Navagement was first making it, but the bastard left it empty and locked.

Sir Penguin
26-03-2003, 07:01:28
He was making sure that it was a European who got first post. Nationalistic bastard.

SP

Funkodrom
26-03-2003, 09:17:06
Originally posted by Sean
I mean by doing so like zees:<?xml version="1.0"?>

<a:root
xmlns:a="http://purl.org/ref/a/"
xmlns:b="http://web.resource.org/ns/b/"
xmlns:c="http://somewhereelsenetirely.com/c/"
xmlns="http://w3.org/XML/ns/"
>

<b:element>
<c:emptyelement />
</b:element>

<c:element>
<c:emptyelement />
</c:element>

</a:root>

I realised what you meant as I walked out of the door of the office on the way home, long day. :o

Resource Consumer
30-03-2003, 13:09:32
so this is where all the geeks went too....

TAZ
31-03-2003, 10:32:12
Do they get day release? I hope not. I don't actually uinderstand any of the previous posts.

Darkstar
01-04-2003, 19:31:31
Day release? We put locks on the doors to keep you people out. :D

Nav
09-04-2003, 14:04:02
As lackey my job is to ask..

Who is writing articles for the section launch and when can I expect them to be ready? :)

Sean
09-04-2003, 14:26:10
SP, Asher, and MattHiggs. Shortly.

:cute:.

Sir Penguin
09-04-2003, 23:03:58
Might not be all that wise to expect a lot during finals. :)

SP

Sean
09-04-2003, 23:09:00
You made the commitment.

Sean
09-04-2003, 23:11:36
Incidentally, I have just had more fun with X(HT)ML. I wrote a script to extract data from some XHTML files using Python and regular expressions, but I reckon it would have been easier to (gasp!) use XSLT.

Perhaps it is only now, once the blind rage has cleared, that I realise that XSLT can be useful. It sure as heck shouldn’t be used for programming.

Sean
09-04-2003, 23:17:22
…although admittedly I would have had to have combined the XSLT with a general-purpose scripting language of some sort, and that probably would have been Python.

And I would have had less problems if IDLE and re didn’t suck so much.

Sean
09-04-2003, 23:18:11
SPAM!

I meant re.sub. The rest of the re module seems fine, but sub never seems to work how I want it to.

Sir Penguin
10-04-2003, 00:58:15
Originally posted by Sean
You made the commitment.

No I didn't. :)

SP

Sean
10-04-2003, 09:10:03
Sure you did.

Sir Penguin
10-04-2003, 09:13:23
Where?

SP

Asher
15-04-2003, 05:11:46
I never said I'd write an article either.

Sir Penguin
15-04-2003, 05:21:02
Higgs did, though (or at least said he could).

My tough finals are done, so I could write something. I just need a subject. Maybe Programming for the Drekkusish. :)

SP

Darkstar
15-04-2003, 05:31:24
How about un topping this thread? The forum has been here for a while.

Nav
16-04-2003, 17:33:45
we should probably wait till the section launches with some content. *hint* *hint*

Resource Consumer
16-04-2003, 17:58:49
Geeks are no good at content

Sean
16-04-2003, 18:00:49
Nav could write an article on submitting to Counterglow *hint* *hint*.

Nav
16-04-2003, 19:04:00
not sure I could pad it to an article

submissions@counterglow.com www.counterglow.com/admin.php submissions@counterglow.com www.counterglow.com/admin.php submissions@counterglow.com www.counterglow.com/admin.php submissions@counterglow.com www.counterglow.com/admin.php submissions@counterglow.com www.counterglow.com/admin.php submissions@counterglow.com www.counterglow.com/admin.php submissions@counterglow.com www.counterglow.com/admin.php submissions@counterglow.com www.counterglow.com/admin.php

Sean
16-04-2003, 22:27:25
Add lots of pictures. You’re good at pictures.

Sir Penguin
16-04-2003, 23:04:57
Damn, I couldn't log in. I guess I'm not the Management.

SP

Darkstar
17-04-2003, 19:15:13
Untop this please.

As for content, how about how to set up a home lan? Or adding in a wi-fi access point, and the ups and downs of leaving it open?