OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: RE: [docbook-apps] How to embed XML transforms into Docbook


Dave Pawson wrote:
> On Sat, 2005-01-01 at 14:57 -0800, Jim Kring wrote:
> > Hello,
> > 
> > I am fairly new to Docbook and XML, so thanks for your 
> patience.  I have
> > what is probably a trivial question:
> > 
> > How can I embed XML content into a Docbook from an XML file 
> that contains
> > non-Docbook entities?
> What do you mean by entity? An external XML instance, or character
> entities?
> (Assume former from later comments)

Yes, I mean an external XML instance.  Such as, the following:

<!ENTITY DBFile1 SYSTEM "DBFile1.xml">

> > 
> > I have created an XSL file that defines a transform of the 
> > XML file's content into a valid Docbook entity.
> Why not run that first, then include them as docbook content?

Yes, that is an option.  But I am trying to avoid that processing step.  I
am getting my feet wet with Docbook (and XML) and I am using the WYSIWYG XML
Editor from XMLmind running in Windows.  My build process for transforming
to HTML/PDF is quite manual (invoking the Transform function of XMLmind).

> > Can I use an ENTITY declaration (or
> > another mechanism) in my Docbook file that would embed the 
> > transformed content of the XML file by referencing the XML
> > and the XSL file? I would like to do this dynamically,
> > without having to create a file containing the transformed
> > XML.
> OK, I don't follow the logic of that, unless its re-use, but 
> if that's the need;
> nonDBFile1.xml
> xslt takes it to DBFile1.xml

Well, what I was hoping to find is some mechanism like the following, which
would allow me to perform the transform on the fly (without actually
creating DBFile1, on disk):

<!ENTITY DBFile1 SYSTEM "nonDBFile1.xml" TRANSFORMEDBY "nonDBtoDB.xslt">

I know that the above is not correct usage of the ENTITY declaration, I am
just trying to give an idea of a theoretical solution.

> simply include the latter, then as part of your processing chain
> generate it prior to processing as docbook.

I agree that this is a good solution.  But, at the moment my processing
chain is manual due to my lack of automated command-line tools (again, I am
using a WYSIWYG editor and Transform tool in Windows).

> > 
> > The only examples I could find of dynamic transformation of
> > XML, were transforms to XHTML by a web browser by adding a  
> > stylesheet reference in the XML file, itself.  In my case, 
> > the XML file does not "know" that it is going to be
> > transformed into a Docbook entity; but rather, the Docbook
> > knows that it wants to transform an XML file into a Docbook
> > entity using a stylesheet.
> Your logic escapes me Jim,
> HTH,

What I was trying to say, is that nonDBFile1.xml has no knowledge of the
fact that it is going to be transformed to DBFile1.xml, for use in a
docbook.  So, if there was a possible solution, by declaring the (xslt)
stylesheet inside of nonDBFile1.xml, this was not a preferred solution.  I
was hoping to find a way to declare, inside the main docbook.xml file, that
there was an external xml instance which is the product of a transform of
nonDBFile1.xml by nonDBtoDB.xslt.

Thanks and Regards,


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]