Re: [PHPTAL] Validation of XHTML - Solution

2009-05-18 Thread Guillaume Lecanu
Le dimanche 17 mai 2009 à 20:32 +0800, Tjerk Meesters a écrit :

 
  It would be much easier if you could just add tal: and metal: inside the
  %coreattrs definition ;-)



Hi everybody,


With the help of Tjerk  Chris, I have created a XHTML STRICT 1.0 custom
DTD for PHPTAL. 
I have attached it to this email.

This will recognize all of the PHPTAL attributes in every XHTML tags.

You can uses this DOCTYPE in your PHPTAL templates :
!DOCTYPE html SYSTEM
http://www.your-internet-web-site.com/path-to-your-dtd/xhtml1-strict-phptal.dtd;

And of course, replace it by the good one at the fly for your final
XHTML code.

Hope this will help.




xhtml1-strict-phptal.dtd
Description: application/xml-dtd
___
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal


Re: [PHPTAL] Validation of XHTML - Solution

2009-05-18 Thread Tjerk Meesters
That's awesome :-)

A few more pointers:
1) it might be somewhat nicer to place phptal attributes in their own group:

!ENTITY % phptalattrs
 tal:define%Text;  #IMPLIED
  tal:condition %Text;  #IMPLIED
...
  tal:block %Text;  #IMPLIED
  
...
  !ENTITY % attrs %coreattrs; %i18n; %events; %phptalattrs;


2) add tal:block block element definitions (the gotcha here is that
inside tal:block you can also use stripped attributes, such as
condition or fill-slot without the tal: prefix

3) same for metal:block i guess? ;-)


Best,
  Tjerk

On Mon, May 18, 2009 at 3:12 PM, Guillaume Lecanu guilla...@lya.fr wrote:
 Le dimanche 17 mai 2009 à 20:32 +0800, Tjerk Meesters a écrit :


 It would be much easier if you could just add tal: and metal: inside the
 %coreattrs definition ;-)


 Hi everybody,


 With the help of Tjerk  Chris, I have created a XHTML STRICT 1.0 custom DTD
 for PHPTAL.
 I have attached it to this email.

 This will recognize all of the PHPTAL attributes in every XHTML tags.

 You can uses this DOCTYPE in your PHPTAL templates :
 !DOCTYPE html SYSTEM
 http://www.your-internet-web-site.com/path-to-your-dtd/xhtml1-strict-phptal.dtd;

 And of course, replace it by the good one at the fly for your final XHTML
 code.

 Hope this will help.



 ___
 PHPTAL mailing list
 PHPTAL@lists.motion-twin.com
 http://lists.motion-twin.com/mailman/listinfo/phptal





-- 
--
Tjerk

___
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal


Re: [PHPTAL] Validation of XHTML - Solution

2009-05-18 Thread Guillaume Lecanu
Le lundi 18 mai 2009 à 16:05 +0800, Tjerk Meesters a écrit :

 That's awesome :-)
 
 A few more pointers:
 1) it might be somewhat nicer to place phptal attributes in their own group:
 
 !ENTITY % phptalattrs
  tal:define  %Text;  #IMPLIED
   tal:condition   %Text;  #IMPLIED
 ...
   tal:block   %Text;  #IMPLIED
   
 ...
   !ENTITY % attrs %coreattrs; %i18n; %events; %phptalattrs;

Fixed



 
 
 2) add tal:block block element definitions (the gotcha here is that
 inside tal:block you can also use stripped attributes, such as
 condition or fill-slot without the tal: prefix

I have no knowledges in DTD specifications, how can we said the
tal:block is available anywhere in the code ?
In XHTML, there is block and inline elements, where inline can't have
nested block element.
We need to autorise it everywhere, even in the head section.

For the stripped tags, I suppose we can create a similar ENTITY %
phptalstrippedattrs for this tal:block

Your help for theses point will be appreciate ! :-)



 
 3) same for metal:block i guess? ;-)

What is metal:block ? I don't see it in the manual... ?

You would mean there is also i18n:block and phptal:block ?


 
 Best,
   Tjerk
 
 On Mon, May 18, 2009 at 3:12 PM, Guillaume Lecanu guilla...@lya.fr wrote:
  Le dimanche 17 mai 2009 à 20:32 +0800, Tjerk Meesters a écrit :
 
 
  It would be much easier if you could just add tal: and metal: inside the
  %coreattrs definition ;-)
 
 
  Hi everybody,
 
 
  With the help of Tjerk  Chris, I have created a XHTML STRICT 1.0 custom DTD
  for PHPTAL.
  I have attached it to this email.
 
  This will recognize all of the PHPTAL attributes in every XHTML tags.
 
  You can uses this DOCTYPE in your PHPTAL templates :
  !DOCTYPE html SYSTEM
  http://www.your-internet-web-site.com/path-to-your-dtd/xhtml1-strict-phptal.dtd;
 
  And of course, replace it by the good one at the fly for your final XHTML
  code.
 
  Hope this will help.
 
 
 
  ___
  PHPTAL mailing list
  PHPTAL@lists.motion-twin.com
  http://lists.motion-twin.com/mailman/listinfo/phptal
 
 
 
 
 

-- 
noovea
Lecanu Guillaume
Directeur Général
Tél. : 01.76.23.00.12
GSM : 06.27.46.36.04
Fax : 05.47.29.57.98

___
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal


Re: [PHPTAL] Validation of XHTML - Solution

2009-05-18 Thread Guillaume Lecanu
Le lundi 18 mai 2009 à 09:57 +0100, Kornel Lesiński a écrit :

 On 18-05-2009 at 09:23:24 Guillaume Lecanu guilla...@lya.fr wrote:
  I have no knowledges in DTD specifications, how can we said the
  tal:block is available anywhere in the code ?
 
 I'm afraid that DTD isn't able to express it (doesn't have what HTML5 calls 
 transparent content model).
 
 In terms of DTD, *:block elements are closest to HTML's ins and del - 
 they can be used in both block and inline context and need to be allowed to 
 contain anything.
  3) same for metal:block i guess? ;-)
 
  What is metal:block ? I don't see it in the manual... ?
 
  You would mean there is also i18n:block and phptal:block ?
 
 Yes.
 


Hi again,

Here is the final XHTML STRICT custom DTD for PHPTAL.

I have added the tal:block metal:block i18n:block phptal:block
with the full attributes and their stripped attributes version.

Like advised by Tjerk, I have also separated the %coreattrs from the %
phptalattrs.

Thanks all for your help, I think we have the final DTD now ! :-)


PS for Kornel: Still no private emails received from you, I have
explicitly white-listed your email, you can try to re-sent to
guilla...@lya.fr, thanks !



xhtml1-strict-phptal.dtd
Description: application/xml-dtd
___
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal


Re: [PHPTAL] Validation of XHTML - Solution

2009-05-18 Thread Kornel Lesinski

On 18 May 2009, at 11:05, Guillaume Lecanu wrote:


Here is the final XHTML STRICT custom DTD for PHPTAL.


Nothing is ever final :)

You can probably trim it down significantly by only overriding values  
in XHTML DTD, and including XHTML DTD as an entity.


Here's an example that adds Safari's input type=search to XHTML/1.0:

!ENTITY % InputType
  (text | password | checkbox |
radio | submit | reset |
file | hidden | image | button | search)
   

!ENTITY % XHTML10Strict PUBLIC
   -//W3C//DTD XHTML 1.0 Strict//EN
   http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;
%XHTML10Strict;

!ATTLIST input
  autosaveNMTOKEN   #IMPLIED
  results CDATA #IMPLIED
  incremental (incremental) #IMPLIED
  


As you see the trick is that some things have to be defined before  
including XHTML DTD, and some after. I'm not sure if you won't run  
into some chicken-egg problem though.


--
regards, Kornel


___
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal


Re: [PHPTAL] Validation of XHTML - Solution

2009-05-18 Thread Guillaume Lecanu
Le lundi 18 mai 2009 à 11:22 +0100, Kornel Lesinski a écrit :

 On 18 May 2009, at 11:05, Guillaume Lecanu wrote:
 
  Here is the final XHTML STRICT custom DTD for PHPTAL.
 
 Nothing is ever final :)

You right !
But I think it's already better and usable than before ;-)


 
 You can probably trim it down significantly by only overriding values  
 in XHTML DTD, and including XHTML DTD as an entity.
 
 Here's an example that adds Safari's input type=search to XHTML/1.0:
 
 !ENTITY % InputType
(text | password | checkbox |
  radio | submit | reset |
  file | hidden | image | button | search)
 
 
 !ENTITY % XHTML10Strict PUBLIC
 -//W3C//DTD XHTML 1.0 Strict//EN
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;
 %XHTML10Strict;
 
 !ATTLIST input
autosaveNMTOKEN   #IMPLIED
results CDATA #IMPLIED
incremental (incremental) #IMPLIED

 
 
 As you see the trick is that some things have to be defined before  
 including XHTML DTD, and some after. I'm not sure if you won't run  
 into some chicken-egg problem though.


humm I'm not sure to understood how to do this, but there is something
wrong with my last version ?
Because if it's only a problem of size of the DTD, it's really not a
problem for me, because the DTD is only for the developers tests, in
production the real DTD will be the XHTML STRICT version... 

But if someone want to create a better version, let's go ! :-)

___
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal