From: Cameron S. <ca...@sh...> - 2003-09-15 10:30:55
Attachments:
x.xml
|
I've created a demo file which uses xinclude to reference a variable. See attached. The good news is xsltproc will process it. cvs update -d . cp x.xml generguide/guide cd generguide/guide xsltproc --novalid --xinclude ../docbook-xsl/html/docbook.xsl x.xml > x.html The bad new is that XXE doesn't recognise the xpath. :( Sean, I don't suppose you can find an editor which will handle x.xml? The other problem is that the <xinclude> tag requires 2 lines of text for one variable, compared to an ENTITY which only takes one word. I'd like to look around and see what other alternatives we have. ENTITIES are starting to look more attractive to me again. -- Cameron Shorter http://cameron.shorter.net Open Source Developer http://generguide.sourceforge.net http://mapbuilder.sourceforge.net http://geotools.org Senior Software Engineer http://www.adi-limited.com |
From: Sean W. <se...@ya...> - 2003-09-15 11:22:01
|
--- Cameron Shorter <ca...@sh...> wrote: > I've created a demo file which uses xinclude to > reference a variable. See > attached. > The good news is xsltproc will process it. > cvs update -d . > cp x.xml generguide/guide > cd generguide/guide > xsltproc --novalid --xinclude > ../docbook-xsl/html/docbook.xsl x.xml > x.html > > The bad new is that XXE doesn't recognise the xpath. > :( > Sean, I don't suppose you can find an editor which > will handle x.xml? I use Oxygen, so I am sitting with Xerces and Xalan. But if I edit under Oxygen, there is no problem. Mainly because it is not trying to be half WYSIWYG:-) Couldn't't resist. I will try it under Morphon and see if it works, when I get a chance. > > The other problem is that the <xinclude> tag > requires 2 lines of text for one > variable, compared to an ENTITY which only takes one > word. > > I'd like to look around and see what other > alternatives we have. ENTITIES are > starting to look more attractive to me again. > Yep. This also bothers me. But it's a trade. To me entities are the way if you are prepared to give up the notion that every document needs to be independently validated and hence transformable. There is another problem. Larger IMHO. Modular documentation means that a document may xref to an ID that is not contained in the current document or any of siblings. If the ID is in the Child document, it is valid. If the ID is in the Parent it is invalid, unless validation starts from the root document. If not you need to perform an additional process to resolve all links in a separate file. Like Bob Stanton suggests at SageHill. There is no easy answer. Unless you want to create an authoring application that abstracts all aspects of XML Publishing and hence protects the author from these types of issues. Arbortext did it nicely. http://www.arbortext.com/ If you want to pay the price which IMHO is reasonable. Sean Wheller __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com |
From: Artur H. <ko...@pl...> - 2003-09-15 12:14:13
|
> > I'd like to look around and see what other > > alternatives we have. ENTITIES are > > starting to look more attractive to me again. > Yep. This also bothers me. But it's a trade. To me > entities are the way if you are prepared to give up > the notion that every document needs to be > independently validated and hence transformable. Sean, example code Cameron sent was not for modular documentation and file inclusion but for project customization and variables set. For this we can use one, external file defining all required entities we want to use in project. I think that for customization with variables inside documents entities are better solution than <xinclude>. As I see from Cameron's example <xicnlude> is just to complicated for this task. However for modular documentation and file inclusion <xinclude> is much better and give us flexibility we need. It seems to me very important that all documents are valid XML files, so all files can be edited in structural editors exactly the same way. I suggest to try implement environment for these to tasks as follows: 1. Customization with entities 2. Modularity with <xinclude> I would like to discuss this during our meeting. Artur -- Artur Hefczyc Open Source Developer http://generguide.sourceforge.net/ http://www.geotools.org/ http://wttools.sourceforge.net/ http://maven-plugins.sourceforge.net/ |
From: Artur H. <ko...@pl...> - 2003-09-15 11:58:47
|
Hi, > The bad new is that XXE doesn't recognise the xpath. :( In what sense it doesn't recognise xpath? Does it try to resolve it in some way? Should it just leave <xinclude> element as is? > The other problem is that the <xinclude> tag requires 2 lines of text for one > variable, compared to an ENTITY which only takes one word. Yes, you are right. While it is acceptable that inclusion of external file takes two lines of code, it does not well look if simple variable takes that amount of space. Readability is decreasing: The purpose of &projectname; project.... (looks fine) The purpose of <xi:include href="resources/generconfig.xml#xpointer(/generconfig/varset/var[@name='projectname']/text())"/> project.... (looks ugly) > I'd like to look around and see what other alternatives we have. ENTITIES are > starting to look more attractive to me again. Cameron, I think we should look for another editor in place of xxe not because of <xicnlude> and <xpath> support but rather because of good support for entities. Artur -- Artur Hefczyc Open Source Developer http://generguide.sourceforge.net/ http://www.geotools.org/ http://wttools.sourceforge.net/ http://maven-plugins.sourceforge.net/ |
From: Sean W. <se...@ya...> - 2003-09-15 12:30:06
|
--- Artur Hefczyc <ko...@pl...> wrote: > Hi, > > > The bad new is that XXE doesn't recognise the > xpath. :( > In what sense it doesn't recognise xpath? Does it > try to > resolve it in some way? Should it just leave > <xinclude> element > as is? > > > The other problem is that the <xinclude> tag > requires 2 lines of text for one > > variable, compared to an ENTITY which only takes > one word. > Yes, you are right. While it is acceptable that > inclusion of external file > takes two lines of code, it does not well look if > simple variable takes > that amount of space. Readability is decreasing: > The purpose of &projectname; project.... (looks > fine) > The purpose of <xi:include > href="resources/generconfig.xml#xpointer(/generconfig/varset/var[@name='projectname']/text())"/> > project.... (looks ugly) > > > I'd like to look around and see what other > alternatives we have. ENTITIES are > > starting to look more attractive to me again. > Cameron, I think we should look for another editor > in place of xxe not because > of <xicnlude> and <xpath> support but rather because > of good support for entities. I think that a basic XML Editor, that does not use CSS to try give WYSIWYM is a sound platform. My thinking is first to get the foundation working. If it works according to standard, then any XML Editor worth its salt will work. The problem with trying to use a WYSIWYM editor is that it adds a level of complexity that keeps detracting development from solving foundation problems, like when to use entity and when to use xinclude. My 2 cents. Sean __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com |