Modify

Ticket #308 (closed enhancement: duplicate)

Opened 3 years ago

Last modified 3 years ago

Support for external entities

Reported by: cweiske@… Owned by: hans
Priority: major Milestone:
Component: phing-core Version: 2.3.2
Keywords: Cc:

Description

Sometimes single tasks in build files grow too large. Parts of the tasks should be externalized, but that is currently not possible. The best way would be - in my opinion - using an external entity reference:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE project [
 <!ENTITY changelog SYSTEM "./build-changelog.xml">
]>
<project name="myproject" default="package" basedir=".">
 ...
 &changelog;
 ...
</project>

Unfortunately, phing's ExpatParser class does not resolve entities. The PHP manual contains an example how to implement entity resolving:  http://php.net/manual/en/example.xml-external-entity.php

maybe that can be used as template for phing.

Attachments

Change History

comment:1 Changed 3 years ago by alexeyshockov

Hi, Christian!

Firstly, I think, that large tasks (large build files) is bad. As and large methods (large classes) in OOP :)

Secondly, if includes is really needed, Xinclude is better way. It's more XML related technology (includes with entities more related to SGML world).

P.S. Implementation, as I think, must be with  DOM functions, because they have built-in support for both technologies (Xinclude and resolving entities).

comment:2 Changed 3 years ago by mrook

  • Status changed from new to closed
  • Resolution set to duplicate

Duplicate of #295

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.