Author Topic: HTML topics  (Read 6895 times)

Offline downside

  • RootsChat Marquessate
  • *******
  • Posts: 4,208
  • Make my day
    • View Profile
Re: HTML topics
« Reply #27 on: Monday 29 May 06 00:07 BST (UK) »
Hi Bob

You have a $ (dollar sign) inserted when it should be a # (hash symbol).
NB you do not include html tags in xml documents, so get rid of the BR tags.

I copied your data into 2 separate files using the hash symbol (although when I copied and pasted your data into Notepad it myteriously changed from a $ into a #)and removed the BR tags and got the following result:-

the cat sat on the mat aa a a a a a a a a a a a a a a
before
===============================

now is the time for all good men to come to the aid of the party a a a a a a 
this is the inserted document                                                 
now is the time for all good men to come to the aid of the party z z z z z z z 
===============================
after
the cat sat on the mat zz zz z z z z z z z zz z z z z z



Regards

downside
Sussex: Floate, West
Kent: Tuffee
Cheshire: Gradwell
Lancashire: Gradwell

UK Census information is Crown Copyright, from www.nationalarchives.gov.uk

Offline Berlin-Bob

  • RootsChat Honorary
  • RootsChat Marquessate
  • *******
  • Posts: 7,443
    • View Profile
Re: HTML topics
« Reply #28 on: Monday 29 May 06 07:33 BST (UK) »
Hi Downsider,

thanks for that.

It must be something to do with german keyboards and different character sets, because I see a # sign in my code, and in my RootsChat postings.

A question (for anybody reading this):

          Do you see 3 hash signs here: # # #  ???

I'll look into it tonight, after work

Bob

Any UK Census Data included in this post is Crown Copyright (see: www.nationalarchives.gov.uk)

Offline Malcolm Bull

  • RootsChat Veteran
  • *****
  • Posts: 908
    • View Profile
Re: HTML topics
« Reply #29 on: Monday 29 May 06 09:46 BST (UK) »
Sorry for getting back, bit I've have some real work to do.

In response to the message from Jon75:  no I never did get it to work - I didn't even get XAMPP to download and run.  The situation is for my Calderdale Companion website where I have a set of programs which I wrote to collate the entries and prepare the text for uploading, and I just wanted to reduce my dependence on them and let HTML (or whatever) do a bit more of the work, but it's obviously more difficult and more obscure to do this.

Obviously a case of ... if it ain't broke, fix it until it is.

Thanks to all

Malcolm Bull
Surname interests:

Huntingdon: Bull / Shelford
Rotherham: Andrews / Steel
Easingwold: Snowball / Potter

Online RJ_Paton

  • RootsChat Honorary
  • RootsChat Marquessate
  • *******
  • Posts: 8,594
  • Cuimhnichibh air na daoine bho'n d'thainig sibh
    • View Profile
Re: HTML topics
« Reply #30 on: Monday 29 May 06 10:35 BST (UK) »
Altering the code above very slightly it works under IE but not under Firefox
Code: [Select]
html>
<body>   
the cat sat on the mat aa a a a a a a a a a a a a a a      <br>
before                                                     <br>
===============================                            <br>
<xml id=text2 src="testinc2.xml" async="false"></xml>
<span datasrc="#text2" datafld="sometext"></span>
===============================                            <br>
after                                                      <br>
the cat sat on the mat zz zz z z z z z z z zz z z z z z    <br>
</body>
</html>


Online RJ_Paton

  • RootsChat Honorary
  • RootsChat Marquessate
  • *******
  • Posts: 8,594
  • Cuimhnichibh air na daoine bho'n d'thainig sibh
    • View Profile
Re: HTML topics
« Reply #31 on: Monday 29 May 06 10:52 BST (UK) »
After reading some more at the W3 Forums it appears that <xml> is an unofficial tag and while the examples of data islands given at W3 work perfectly well within IE (5 or above) they don't appear to work at all under Firefox.

Offline Jon75

  • RootsChat Extra
  • **
  • Posts: 7
    • View Profile
Re: HTML topics
« Reply #32 on: Monday 29 May 06 10:53 BST (UK) »
Hi all,

With the first PHP example given I saw that a simple " ; " was missing. To include data in and existing file pulled from another file the following should work fine.

index.php example:

Code: [Select]

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>

<table width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
  <tr>
    <td>The data from your normal page in here.</td>
  </tr>
  <tr>
    <td> <?php include ("path/to/yourdata.php"); ?> </td>
  </tr>
  <tr>
    <td>The data from your normal page in here.</td>
  </tr>
</table>


</body>
</html>


The yourdata.php will contain the data that you wish to include. This also could be any extension e.g yourdata.html.

The code you tried earlier was:
Code: [Select]

<? include "xxx.html" ?>


You can see that I have changed this to:
Code: [Select]

<?php include ("path/to/yourdata.php"); ?>


If yourdata.php is in the same folder as the index.php you can drop the path/to/ part. You can also drop it if you have a base href in you head section.

Hope that is of some help to you.

Kind regards.

Online RJ_Paton

  • RootsChat Honorary
  • RootsChat Marquessate
  • *******
  • Posts: 8,594
  • Cuimhnichibh air na daoine bho'n d'thainig sibh
    • View Profile
Re: HTML topics
« Reply #33 on: Monday 29 May 06 11:07 BST (UK) »
Further information on enabling xml data islands within Firefox can be found at
http://uk.builder.com/architecture/web/0,39026570,20274592,00.htm

where
Quote
at first glance, giving Mozilla XML data island support seems like wizardry, it is accomplished through the use of CSS, JavaScript, and the HTML DOM Level 1.

Offline Berlin-Bob

  • RootsChat Honorary
  • RootsChat Marquessate
  • *******
  • Posts: 7,443
    • View Profile
Re: HTML topics
« Reply #34 on: Monday 29 May 06 11:33 BST (UK) »
Jon75,

thanks for that.  Funny how it works on some set-ups and not on others.

<? include( "filename" ); ?> is definitely the 'correcter' way of doing it.

Falkyrn,

thanks for that information.  I also checked the W3 site, and what I wrote seems OK according to them, but I will have another go later.

Anybody,

Still an open question: 

Do you see 3 hash signs here: # # #   ???
Or 3  Euro signs here: € € €   ???

Bob

Any UK Census Data included in this post is Crown Copyright (see: www.nationalarchives.gov.uk)

Offline downside

  • RootsChat Marquessate
  • *******
  • Posts: 4,208
  • Make my day
    • View Profile
Re: HTML topics
« Reply #35 on: Monday 29 May 06 11:50 BST (UK) »
Hi Bob

Yes I can see your hash signs and your Euro signs.  If you are using Linux then your keyboard layout might do strange things although usually it means your # signs turn into £ signs rather than $ signs.

About 30 emails ago someone asked if it was possible to import text from an external file without resorting to JavaScript or PhP.  I think someone said it was not possible to do this using standard HTML and I offered a way of doing it using XML.  My method  is a cheats way of doing it as XML has been primarily designed to be used as a database language using unformated data.    Typically it is used in this context:-
<individual>
          <id>I001</id>
          <firstName>John</firstName>
          <surname>Smith</surname>
          <whenBorn>02 Jan 1901</whenBorn>
          <whereBorn>Worthing, Sussex</whereBorn>
          <whenDied>02 Feb 1975</whenDied>
           <whereDied> Brighton, Sussex</whereDied>
</individual>

So to put a whole paragraph or page of text into one datafield works but it is not its normal use.

As you may be aware there the GEDCOM format designed in 1996 is about to be replaced with XML so it is worth reading up about it and its capabilities as it will be the new standard.

Regards

downside
Sussex: Floate, West
Kent: Tuffee
Cheshire: Gradwell
Lancashire: Gradwell

UK Census information is Crown Copyright, from www.nationalarchives.gov.uk