SGML HTML XML What's the Difference? New Technol...


Welcome, Guest. Please login or register.
Username:   Password:

Hosted in the Cloud RSS

Recent Topics

Gallery Latest


749 Views
0 comment(s)

726 Views
0 comment(s)


1079 Views
0 comment(s)

925 Views
0 comment(s)


805 Views
0 comment(s)

832 Views
1 comment(s)

Search The Gallery

User Info

Welcome, Guest. Please login or register.
September 21, 2017, 20:38:38 PM

Login with username, password and session length

Forum
Web
Gallery

   

DatahopaForumTechnology Chat New Technology, Science etc ...SGML HTML XML What's the Difference?



Pages: [1] 2

SGML HTML XML What's the Difference?

Viewing: 0 Members and 1 Guest       Total Views: 4312

Offline Snowcrash Topic starter
England Global Moderator
Posts: 2724
Rank: Certified

Found these and thought they were interesting. Will be at least one more.



Posted April 22, 2016, 22:00:24 PM Logged
“I cannot remember the books I've read any more than the meals I have eaten; even so, they have made me.”

Ralph Waldo Emerson

Offline Snowcrash Topic starter
England Global Moderator
Posts: 2724
Rank: Certified



Anyone like these?
Posted April 30, 2016, 10:38:56 AM Logged
“I cannot remember the books I've read any more than the meals I have eaten; even so, they have made me.”

Ralph Waldo Emerson

Offline Data
United Kingdom Administrator
Posts: 4668
Rank: Certified

I've just watched them all, educational for me.  Smiley

Did laugh at one point, back in the old days they said it was fine to omit end tags to save disk space.  lol
Posted April 30, 2016, 11:39:03 AM Logged

Offline Snowcrash Topic starter
England Global Moderator
Posts: 2724
Rank: Certified

Found a related vid...

Posted May 28, 2016, 19:56:21 PM Logged
“I cannot remember the books I've read any more than the meals I have eaten; even so, they have made me.”

Ralph Waldo Emerson

Offline 8pla.net
United States WWW Posts: 154
Rank: Apprentice Adept

Interesting Computer Science presentations.

Sample: index.php with PHP and SGML tags and more...
Code:
<!DOCTYPE html>
<html>
<head>
<script language="php">
   echo "<h3>Wowee!  I'm a script style tag!</h3>";
</script>
</head>
<body>
<pre>
<?php  echo "Hey, I'm a php style tag!"?>


<? echo "And, I'm an optional SGML style tag!"; ?>
</pre>
</body>
</html>

Optionally there is also support for SGML style tags, by configuring the php.ini file (supposedly). Yet, a collision with parsing XML, may explain why SGML style tags are rarely used in PHP, I think.  But, Computer Science is always evolving, it seems.

Posted June 11, 2016, 16:51:26 PM
Last Edit: June 11, 2016, 22:39:24 PM by 8pla.net
Logged
My Very Enormous Monster Just Stopped Using Nine

Offline DaveMorton
United States WWW Global Moderator
Posts: 2528
Rank: Certified
Comfort the Disturbed! Disturb the Comfortable!

Off Topic:
Hey, 8-man, you might be interested in knowing that I've recently re-designed the AIML validator in Program O to use XML Schema (XSD), rather than the old XML DocType Declaration (DTD). This change allows the validator to detect improper syntax within <pattern> and <that> tags, which in turn virtually eliminates "botmaster error" type issues where punctuation creeps into the AIML inputs. I'll soon be putting this AIML validator up as both part of an "AIML Toolkit/repository" and as a stand-alone page on my website, both available for everyone to be able to use.
Posted June 12, 2016, 13:50:41 PM Logged
Safe, Reliable Insanity, Since 1961!
Chat With Morti!

CAPTCHA4us

Offline Snowcrash Topic starter
England Global Moderator
Posts: 2724
Rank: Certified

Found this related vid.

Posted June 29, 2016, 20:32:51 PM Logged
“I cannot remember the books I've read any more than the meals I have eaten; even so, they have made me.”

Ralph Waldo Emerson

Offline 8pla.net
United States WWW Posts: 154
Rank: Apprentice Adept

I enjoyed these videos,  and he is certainly entitled to his opinion.  But, I have to politely disagree with his claim that HTML is a programming language.   There just isn't any "programming" going on in HTML.  The Hypertext links via the Markup Language to something "programmed" already.   Therefore, any "programming" has already taken place.
Posted July 02, 2016, 01:55:10 AM Logged
My Very Enormous Monster Just Stopped Using Nine

Offline DaveMorton
United States WWW Global Moderator
Posts: 2528
Rank: Certified
Comfort the Disturbed! Disturb the Comfortable!

There just isn't any "programming" going on in HTML.  The Hypertext links via the Markup Language to something "programmed" already.   Therefore, any "programming" has already taken place.

Ah, but I have to disagree with that premise, as well. Let's look at this as a form of pseudo-code, using a very simple example. First, the HTML:
Code:
<html>
  <body>
    <h1>Welcome!</h1>
    <p>This is just a simple paragraph</p>
  </body>
</html>

Now, what it would look like in PHP-like code:

Code:
$p = 'This is just a simple paragraph';
$h1 = 'Welcome!';

$body = body(array(h1($h1), p($p));

exit(html($body));


// functions - this is what the web browser does to format the content (sort of):

function h1($content) {
  $content->font_size = 6; // arbitrary number - larger than normal
  $content->font_weight = 'bold';
  return $content;
}

function p($content) {
  $content->text_indent = '1em'; // Indent the first letter by the width of the letter M
  $content->padding = '2em';
  return $content;
}

function body (Array $contentArray) {
  $output = '';
  foreach ($contentArray as $content) {
    $output .= $content;
  }
  return $output;
}

function html ($input) {
  echo ($input);
}

Of course this is pretty much a ridiculously primitive and simple example, but I think it gets my point across. Just because you're not writing the individual functions themselves doesn't mean you're not 'programming'. According to Merriam Webster, a "program" is as follows:

Quote from: Merriam-Webster

 
 
 
Full Definition of program
1  [Late Latin programma, from Greek]:
    a public notice

2
    a :  a brief usually printed outline of the order to be followed, of the features to be presented, and the persons participating (as in a public performance)
    b :  the performance of a program; especially :  a performance broadcast on radio or television
3:
    a plan or system under which action may be taken toward a goal
4:
    curriculum
5:
    prospectus, syllabus
6
    a :  a plan for the programming of a mechanism (as a computer)
    b :  a sequence of coded instructions that can be inserted into a mechanism (as a computer)
    c :  a sequence of coded instructions (as genes or behavioral responses) that is part of an organism

For our needs, #6b applies, as HTML code is a sequence of coded instructions for a web browser to interpret and display. Sure, the main portion of the "code" lies within the web browser, but without the HTML instructions to interpret and display, the browser by itself cannot work. Thus, when we write HTML code, we're programming the browser to display what we tell (instruct) it to. So while it's very limited, HTML ~IS~ a programming language. Smiley
Posted July 02, 2016, 03:54:43 AM
Last Edit: July 02, 2016, 12:28:01 PM by DaveMorton
Logged
Safe, Reliable Insanity, Since 1961!
Chat With Morti!

CAPTCHA4us

Offline Data
United Kingdom Administrator
Posts: 4668
Rank: Certified

This is an interesting conundrum, maybe as computers evolve and the programming becomes easier we will need to redefine what a "programming language" is.

Who can write a program in 1's and 0's ?

To make it easier layers are added, then more layers are added on top to make it even easier.

Is HTML a programming language ? Yes it is because it's just another layer on the road to binary. 
Posted July 02, 2016, 12:20:15 PM Logged

Offline Snowcrash Topic starter
England Global Moderator
Posts: 2724
Rank: Certified

HTML doesn't have an if/then/else statement so isn't a programming language in that sense.
Posted July 02, 2016, 14:40:05 PM Logged
“I cannot remember the books I've read any more than the meals I have eaten; even so, they have made me.”

Ralph Waldo Emerson

Offline DaveMorton
United States WWW Global Moderator
Posts: 2528
Rank: Certified
Comfort the Disturbed! Disturb the Comfortable!

A decision tree isn't a required part of a program, so while HTML lacks the ability to execute a decision tree, that doesn't disqualify it as a programming language.
Posted July 02, 2016, 15:48:10 PM Logged
Safe, Reliable Insanity, Since 1961!
Chat With Morti!

CAPTCHA4us

Offline DaveMorton
United States WWW Global Moderator
Posts: 2528
Rank: Certified
Comfort the Disturbed! Disturb the Comfortable!

You'll notice that I'm rigidly avoiding the use of CSS/JS here, and keeping strictly to HTML. If the other two languages were tossed into the mix, then there would basically be no discussion. Smiley
Posted July 02, 2016, 15:51:11 PM Logged
Safe, Reliable Insanity, Since 1961!
Chat With Morti!

CAPTCHA4us

Offline 8pla.net
United States WWW Posts: 154
Rank: Apprentice Adept

Thanks for the response, Dave.  Everything that follows is strictly friendly toned.   i do respect your point of view, and enjoy reading it.   I just friendly disagree, meaning it is a really weak disagreement, and I am still interested in your theories, and willing to keep an open mind about how you might go about proving them.  Same with the guy in the video.  He's a smart fellow too.

However, let me, just for the sake of conversation, add that the following is also valid php code:

filename: welcome.php
Code:
<html>
  <body>
    <h1>Welcome!</h1>
    <p>This is just a simple PHP file</p>
  </body>
</html>

"a plan for the programming of a mechanism (as a computer)", does HTML program a mechanism?

'Sure, the main portion of the "code" lies within the web browser, but without the HTML instructions to interpret and display, the browser by itself cannot work.', yet remove the hyper, which is the link part, and the markup language, and the web browser is perfectly happy displaying text....  (HTML: Hyper Text Markup Language).  Not to mention many other file formats, which I won't go into, because I want to change focus to something cool...  I used to  embed web browser modules, right into Windows C language applications.  Basically, I would dedicate the embedded web browser to only load my website...  Cheesy    And, then the program would do whatever else I programmed it to do.

I'm still studying your excellent, interesting theory.  Keep developing that theory, it's good stuff... I like it. Thanks for that, my friend!  I am willing to keep an open mind.

Data asked, "Who can write a program in 1's and 0's ?"... I have, but for practical purposes... Assembly Language maps to op codes which are in hexadecimal, and by converting that to "1's and 0's" which is more time consuming but not too hard to do,  it is interesting to see how closely related instructions come down to a binary flag.  In other words, you can study the design of the low level programming.  I apologize if this is not the best way to clearly discuss this topic.   But, in practice it is not too bad.  There are good utilities that are very helpful, and it is fun... To like, patch a program to make it do something else.

@Snowcrash:

Just for a point of interest...  if elif else end,  Conditional Comments

Reference: https://en.wikipedia.org/wiki/Conditional_comment

Code:
<script>
/*@cc_on

  @if (@_jscript_version == 11)
    document.write("You are using IE11 with an older document mode");
  @elif (@_jscript_version == 10)
    document.write("You are using IE10");
  @elif (@_jscript_version == 9)
    document.write("You are using IE9");
  @elif (@_jscript_version == 5.8)
    document.write("You are using IE8");
  @elif (@_jscript_version == 5.7 && window.XMLHttpRequest)
    document.write("You are using IE7");
  @elif (@_jscript_version == 5.6 || (@_jscript_version == 5.7 && !window.XMLHttpRequest))
    document.write("You are using IE6");
  @elif (@_jscript_version == 5.5)
    document.write("You are using IE5.5");
  @elif (@_jscript_version < 5.5)
    document.write("You are using a version older than IE5.5");
  @else
    document.write("You are using an unknown version of IE");
  @end
 
@*/
</script>

Your point is still valid...  There is no conditional branching in HTML.
However, this is good content to consider for our discussion.

Code:
<!--[if gt IE 6]><!-->
This code displays on non-IE browsers and on IE 7 or higher.
<!--<![endif]-->
Posted July 03, 2016, 20:04:33 PM
Last Edit: July 03, 2016, 21:52:00 PM by 8pla.net
Logged
My Very Enormous Monster Just Stopped Using Nine

Offline 8pla.net
United States WWW Posts: 154
Rank: Apprentice Adept

Code:
linux@console:~$ mkdir ~/public_html
linux@console:~$ cd ~/public_html
linux@console:~/public_html$ php -S localhost:8000

PHP 5.4.6-1ubuntu1.8 Development Server started at Tue Jul  5 12:21:49 2016
Listening on http://localhost:8000
Document root is /home/human/public_html
Press Ctrl-C to quit.


screenshot.png
SGML HTML XML What's the Difference?
* screenshot.png (25.01 KB, 429x227 - viewed 177 times.)
Posted July 05, 2016, 07:30:36 AM Logged
My Very Enormous Monster Just Stopped Using Nine
Pages: [1] 2
Jump to:  

Site Activity
Most Online Today: 150
125 Guests, 1 User
Urania