Thank you for your response.  First of all, I'm not sure if you are
familiar, but I am working on a project called eNetwizard Content
Management Server.  More is available here:
Content is stored as XML, but not in the usual manner.  eNetwizard is
able to manage an unlimited number of domains and websites from a
central web environment.  It does this because it acts as a web server
and determines what content to deliver based on the URL string.  Content
is stored in a matrix folder like this:
In this manner, all content for
<>  is stored in the
/matrix/net/enetwizard/www folder.  However, it is even more complicated
than that.  Content is compiled by scope.  /matrix is considered the
global scope.  /matrix/net/enetwizard is in the domain scope.
/matrix/net/enetwizard/www is in the website scope.  And the files in
that directory are in the page scope.  Each of these directories can
have a file (_.rsw) which is a part of the eNetwizard XML that is
compiled.  It must be fully-conformant XML and this is determined by the
class I wrote to validate it.  My understanding is that PHP does not
have the ability to use DTD's - am I wrong about this?

Anyway, the reason for the scope is to build complex templates and
pages.  For example, maybe you want a copyright at the bottom of every
page that is on the domain - you simply put it in the
<TAIL> section of the domain scope .RSW file.  When eNetwizard is
called, it compiles it all, validates it, and then converts it to HTML
(or anything else you want it to really).
Here's an example:  (this file is the result of compiling
and validating the .RSW files)  (this file is the result of
converting it)
Now, to get to what I'm trying to get at:  I understand that XML used
the ampersands as reserved words.  This is a good thing in most
instances, because it will be nice to define these entities, but how do
I do that with the limitations of the PHP parser functions?  And what is
the way around this?  I believe that the way I have things set up now, I
would like it to simply treat them as CDATA, because these can be dealt
with in the $Server class later on (when doing the conversions to HTML,
Also, in order to validate the DTD (that I could make if PHP can work
with it) - it would have to wait till after the compilation of the .RSW
files - the .RSW files are also parsed as XML and first put into an
associative array - it organizes them by their main grouping and scope
-- <STYLE>, <META>, <HEAD>, <BODY>, and <TAIL> -- it works really
nicely, as those two links will show...
If you'd like to see the code for these two classes, let me know, and
I'll send them to you, and you can see how I have this set up.  It may
help to have a more interactive tour of how all of this works, but I
haven't gotten that far in the project yet.  I just finished the last of
the core (this XML stuff) and am about to start creating the wizards
(management panels) for the project, then the documentation, then the
Thanks very much if you can give me an idea on how to tackle this unique
Robert Samuel White wrote:
> I am having a hard time understanding one of the features of the xml
> parser functions.
> If the string I am parsing includes &nbsp; or something similar, it
> encounters an error.  I've read the docs and I don't understand how to
> have the parser process these.  Any advice would be great.
Basically, unless you've coded something to deal with them ampersands 
are the ultimate reserved word in XML. The easiest way to deal with them

is to scrub them to &amp;nbsp; before they go through the XML parser.
The "right" way to deal with them is to define &nbsp; as a valid entity 
in your DTD and make sure that all XML strings have a DTD when they are 
fed through the parser.
J Wynia

Reply via email to