PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > php.general > Proposal of DOM non-standard method: DOMDocument::loadCharacterEntitiesFromDtd($path)
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Proposal of DOM non-standard method: DOMDocument::loadCharacterEntitiesFromDtd($path)

Réponse
 
LinkBack Outils de la discussion
Vieux 22/10/2007, 13h50   #1
Freyjkell
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Proposal of DOM non-standard method: DOMDocument::loadCharacterEntitiesFromDtd($path)

DOMDocument::loadCharacterEntitiesFromDtd($path);

I like to load character entities (not whole document type definition).

When I try to do that by creating my own DTD with only character
entities, and setting resolveExternals to true, then DTD parser
complains that it didn't occur root definition.

The proposed method, if called before DOMDocument::load/loadXML(), would
get character entities from DTD (and its modules) and apply them during
parsing XML. If called multiply, or if XML contains a DTD reference,
entities put before would be overwritten.

// I sent this post to php.xml.dev, but I didn't get reply for long time.

--
Freyjkell
  Réponse avec citation
Vieux 22/10/2007, 14h07   #2
Rob
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Proposal of DOM non-standard method: DOMDocument::loadCharacterEntitiesFromDtd($path)

Freyjkell wrote:
> DOMDocument::loadCharacterEntitiesFromDtd($path);
>
> I like to load character entities (not whole document type definition).
>
> When I try to do that by creating my own DTD with only character
> entities, and setting resolveExternals to true, then DTD parser
> complains that it didn't occur root definition.
>
> The proposed method, if called before DOMDocument::load/loadXML(), would
> get character entities from DTD (and its modules) and apply them during
> parsing XML. If called multiply, or if XML contains a DTD reference,
> entities put before would be overwritten.
>
> // I sent this post to php.xml.dev, but I didn't get reply for long time.
>

A day or two is not a long time and some things are not cut and dry,
requiring a little time to think about it. If you want to override the
DTD, you should look at using catalogs or create a custom stream handler
to alter the XML document as it is parsed.

Rob
  Réponse avec citation
Vieux 23/10/2007, 10h46   #3
Per Jessen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] Proposal of DOM non-standard method: DOMDocument::loadCharacterEntitiesFromDtd($path)

Freyjkell wrote:

> DOMDocument::loadCharacterEntitiesFromDtd($path);
>
> I like to load character entities (not whole document type
> definition).
>


Whilst we're on this subject - where do you guys normally load character
entities from? I recently ported some stuff from the PHPH4 XSLT
implementation (with saxon) to PHP5, and I seem to recall having
problems with getting entities defined.


/Per Jessen, Zürich
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 23h14.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09286 seconds with 11 queries