John L. Clark wrote:
> On Wed, Mar 29, 2006 at 06:01:17PM +0100, Paul Moloney wrote:
>>As mentioned in this query to the docbook-apps
>>list 
>>(http://www.oasis-open.org/archives/docbook-apps/200501/msg00090.html),
>>XMLMind rewrites entities (on a tangent, I'm just curious as to why it
>>does this?). This leaves me with the problem of how to have productnames,
>>etc, being defined across custom documentation (each custom book
>>has its own book file, but shares chapter files).
>>
>>The suggested workarounds seem to be to make the stylesheet
>>select the required product name, etc, but I hate this, as it
>>breaks the rule of seperating content from style - I really don't
>>want people having to edit stylesheets to add new product names.
>>
>>Does anyone have an elegant solution to this problem?
> 
> I like Norman Walsh's solution, called `ml-macro.xsl`[0], which uses
> processing instructions to define macros.  Unfortunately, it requires
> that the macro definition PIs be located before the root element in the
> document, and XXE does not allow direct manual editing of content
> outside the root element.  I believe that you can still write custom
> commands to add processing instructions to a document being edited in
> XMLmind, though.  I've been meaning to experiment with this, but haven't
> yet had a chance to do so.  It might actually be beneficial to not be
> able to edit these PIs directly, because they need to have a specific
> format which you could control more easily with a specific UI.  Another
> alternative is to extend the ml-macro concept slightly to have it search
> for macro definition PIs anywhere in the document.
> 
> The other thing about Norm's solution is that his macro processor is
> written in XSLT 2.  I ported it to XSLT 1+EXSLT[1]; I don't know how
> much support for EXSLT XXE's built-in XSLT processor has.  I need to
> experiment with this as well.  I also posted some macro files
> corresponding to the common character entities[2].
> 

XXE includes Michael H. Kay's Saxon 6.5.4. See the "EXSLT" section in
"SAXON Extensions" http://saxon.sourceforge.net/saxon6.5.4/extensions.html



Reply via email to