|
Hockey wrote:
I thought it was just another markup language though?
It is, essentially.
However it is what you do with it that counts, lol. When coupled with another XML related technology, XSL (eXtensible Stylesheet Language) you can do some impressive "tranformation" of XML data.
Basically I can take an XML file, run it through an XSL file and have HTML come out the other side. Or I can transform XML to a tab delimited text file, or even another dialect of XML.
So to use XML in your website, you would store your forum in an XML file and then have how you want it too look stored in the XSL file. You combine the two and send the resulting HTML to the browser.
You could then use ASP (or PHP) to write new entries to the XML data file. So in effect your XML file becomes your database and XSL is your query tool.
You can also get most modern databases to output records in XML format, which is useful when you want to present those records to a browser via XSL.
Also as browsers modernise more and more of the XML/XSL transform can happen on the client, and not on the server.
The possibilities are huge and exciting. Also XML is not meant as a replacement for your database, so don't compare the two as if they were competing technologies. They serve different purposes and work well together.
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
The greatest thing you'll ever learn is just to love, and to be loved in return - Moulin Rouge
Alison Pentland wrote:
I now have an image of you in front of the mirror in the morning, wearing your knickers, socks and shoes trying to decided if they match!
|
|
|
|
|
What RDBMS are you using? In the meantine, think about this...
Table: Messages
[MessageID][ForumID][UserID][Subject][Data][Nesting][Date]
Table: Users
[UserID][Password][Email][...]
Table: Forums
[ForumID][Title][...] You want to normalize the database to at least level three, so you don't end up repeating information over and over again. Make sure that under the Messages table that MessageID ForumID and UserID combined make up the primary key, and set foregin keys to ForumID and UserID to their respective tables.
Oh, and take Paul's advice about using tables. And, a well-designed DB can have a heiarchy so you don't have to use XML for this. For performance's sake, I'd suggest an import/export to XML, but not using XML for the transactions.
Jeremy Falcon
Imputek
<nobr>"..." - Paul Watson 07-17
|
|
|
|
|
mySQL
The normalization of the database wasn't exactly what i was after, sorry...I prolly didn't explain well enough.
CP message threads have a hierarchy like one child is the child of another, but I have looked at a few examples of other forums and each implements a forum with a tree type structure...i've never worked with trees except binary trees when tinkering around with Huffman compression algorithms.
Any ideas on how I would make a DB structure like this...??
Also is it possible to insert a new record between 2 existing records rather than append new records all the time...???
if so, can I also somehow recalculate the auto-pkid value so if I insert
pk-id 4 between 1 and 2 would the RDBMS recalculate 4 and 2 to 2 nd 3 instead and so on throught out the database...??
Thanx
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Take a look at the Messages table I typed in earlier...
[MessageID][ForumID][UserID][Subject][Data][Nesting][Date]
The Nesting field could contain the MessageID of its parent. But, that was just for illustration. For something like CP, I'd personally add two fields, as this would also help speed up the displaying of the messages.
Like this...
[MessageID][ForumID][UserID][Subject][Data][Root][Parent][Date]
Root would contain the MessageID for the base of the thread and Parent would contain the MessageID of it's message's parent. For base messages you could set both Root and Parent to NULL.
Using the structure above, here's a pretend thread in the DB...
[1][1][jeremy]["guess what?"] ["I have toe cheese!"][NULL][NULL][2002-07-22]
[2][1][hockey]["Re: guess what?"] ["That's grose!"] [1] [1] [2002-07-22]
[3][1][jeremy]["Re: Re: guess what?"] ["No, it's cool."] [1] [2] [2002-07-23]
[4][1][hockey]["Re: Re: Re: guess what?"]["You're crazy."] [1] [3] [2002-07-23] When browsing the messages like CP's DHTML view, you could use a simple JOIN to retreive the data in that manner.
Hockey wrote:
if so, can I also somehow recalculate the auto-pkid value so if I insert
PHP has a mysql_insert_id() function that will return the id generated from the previous INSERT statement. Check it out.
Jeremy Falcon
Imputek
<nobr>"..." - Paul Watson 07-17
|
|
|
|
|
hi t want to change the attribut of a file to read only from asp page how can i do ...
|
|
|
|
|
mysterious_must wrote:
hi t want to change the attribut of a file to read only from asp page how can i do ...
Short answer is to look into the FileSystemObject in ASP. It has all the file handling methods you need.
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
The greatest thing you'll ever learn is just to love, and to be loved in return - Moulin Rouge
Alison Pentland wrote:
I now have an image of you in front of the mirror in the morning, wearing your knickers, socks and shoes trying to decided if they match!
|
|
|
|
|
I have a DataGrid with a delete column. When the user clicks the delete link I would like to have a confirm dialog popup. I would like to use the standard LinkButton because of the CommandName and CommandArgument.
How does one assign a client side script to the OnClick of a LinkButton?
|
|
|
|
|
See if this fits...
http://www.dotnetbips.com/displayarticle.aspx?id=108
Mike Stanbrook
mstanbrook@yahoo.com
|
|
|
|
|
Just what I needed. Thanks
|
|
|
|
|
Situation:
Datagrid that allows editing of a record. Works fine.
Problem/Issue:
When a record is selected to be edited, the page refresh (post) causes
the entire page to be redrawn. This is a big pain if the list to be edited is long, and the item currently being edited is contained near the end of the list.
I realize that adding DataGrid Paging is one answer, but is there any other way to have the page automatically relocate to the current Datagrid row being edited?
(Something tells me this is either "way easy" and I should be embarassed for having not figured it out, or it's not possible.)
TIA.
Mike Stanbrook
mstanbrook@yahoo.com
|
|
|
|
|
You could set Page.SmartNavigation = true.
MAC IE has problems with though.
|
|
|
|
|
Hi
I would like to display a separate html page within a section of a table. The page needs to be dynamically changed when the user clicks a button...
I've tried to read the file in javascript and then modify the contents of a tag... but to no avail.
I've also tried to load the page into a hidden frame and then copy its contents across to the tag... and as this posting suggests that didn't seen to work either.
can anyone be of assistance?
thanks in advance.
Steve;)
|
|
|
|
|
IE 4+ and NS 6+ support the iframe tag. You could try that or rewrite the page to use frames and have the "inner" page reload in a given cell. Alternatively, PHP's file I/O (and ASP, *cough* *cough*) can read any web page off any server dynamically, so you could have it read the page and insert it into the HTML document before it's sent to the browser.
Jeremy Falcon
Imputek
<nobr>"..." - Paul Watson 07-17
|
|
|
|
|
Jeremy Falcon wrote:
and ASP, *cough* *cough*
Lol, why, "cough cough"?
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
|
|
|
|
|
Philip Patrick wrote:
Lol, why, "cough cough"?
Well, I prefer PHP, but I have to mention ASP because CP is all about MS technologies. I'm trying to keep the going.
Jeremy Falcon
Imputek
<nobr>"..." - Paul Watson 07-17
|
|
|
|
|
|
Where to find the code examples for that book!?
Can you give me a link?
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
Sorry for the proto-advertisement but I think this is a worthwhile "cause."
WestCiv are offering a free weekly online course on HTML and CSS. They can explain it much better than I can so go read the introduction.
Highly recommended as these guys know what they are talking about. Even for us chaps who think we know HTML, this kind of course is worthwhile.
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
The greatest thing you'll ever learn is just to love, and to be loved in return - Moulin Rouge
Alison Pentland wrote:
I now have an image of you in front of the mirror in the morning, wearing your knickers, socks and shoes trying to decided if they match!
|
|
|
|
|
When I had a look at this a couple of days ago it was talking about $24.95. Did they change from the time you posted the link or once again am I blind to the obvious?
Michael Martin
Australia
mjm68@tpg.com.au
"I personally love it because I can get as down and dirty as I want on the backend, while also being able to dabble with fun scripting and presentation games on the front end."
- Chris Maunder 15/07/2002
|
|
|
|
|
Michael Martin wrote:
Did they change from the time you posted the link or once again am I blind to the obvious?
Well I won't comment on you going blind but no nothing has changed.
Basically you can either do the course for free at their weekly pace, or pay $24.95 and get the whole course and do it at your pace.
i.e. They have the whole course already, but are releasing it for free week by week. If that pace is too slow for you and you just have to get to week 7 right now, then buy the course.
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
The greatest thing you'll ever learn is just to love, and to be loved in return - Moulin Rouge
Alison Pentland wrote:
I now have an image of you in front of the mirror in the morning, wearing your knickers, socks and shoes trying to decided if they match!
|
|
|
|
|
I you known any cheap Web Hosting Service support ASP,
Ms SQL Server. Let me known.
Thank
|
|
|
|
|
Hi,
I'm having a problem rounding some numbers using Javascript.
I'm using Server Side Include to call the header of my page, inside the header I'm storing numeric variables. On the main page I'm multiplying and totalling the variables. But the results do not round to 2 decimal places.
As an example
the code in my header looks like this
<script language="JavaScript">
var aa = 20.15;
var bb = 4.08;
var cc = 30.00;
</script>
the code in my main page looks like the following
<script language="JavaScript">
var a =(aa + bb)*cc;
a=a*100;
if(a % 10 == 0){ a = Math.round(a);
a=a/100; a=a+'0' } else{ a = Math.round(a);
a=a/100;
} document.write(a);
</script>
The result is 726.9
I want the result to be displayed as 726.90
Can anyone help?
Thanks in advance
|
|
|
|
|
You'll have to use some trickery to get two decimal places deep. And, leave the value as a string only converting when needed; otherwise, a trailing zero could be dropped.
x = 726.9
x = Math.round(x * 100);
x = String(x);
x = x.substring(0, x.length-2) + "." + x.substr(x.length-2, 2);
Jeremy Falcon
Imputek
<nobr>"..." - Paul Watson 07-17
|
|
|
|
|
I obtain a variant VT_ARRAY | VT_UI1 from a COM in an ASP script. I need to write the content of the variant as a response to the client.
How could i do it?
rechi
|
|
|
|
|
Response.BinaryWrite
cheers,
Chris Maunder
|
|
|
|