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] creating a macro or something similar


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Timo,

first of all I move the thread to docbook-apps@ list where it belongs.

Timo Matheja a écrit :
> I want to generate something like a macro in XML with the aid of the
> xsl stylesheet.
> 
> Is there a prefered possibility?
> 
> So I created a new Tag called for example <img/> to shorten an
> expression defined in the xsl stylesheet..

OK so if I understand correctly, you wish to generate a DocBook
compatible version of your document, using a preprocessing transformation.

> Now saxon should create a new xml file that is like the one before
> BUT every <img/> tag should completely be replaced by that defined
> longer expression.
> 
> How can I cause this replacement of this small parts in my whole
> document?

Just use a stylesheet like the one below.
Though another option consists in using xinclude:
http://www.sagehill.net/docbookxsl/ModularDoc.html

Camille

- ---

<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:stylesheet
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
  version="1.1">

<xsl:output method="xml" encoding="UTF-8" indent="no"/>
<xsl:template match="img">
  <!-- Insert the longer expression here -->
</xsl:template>

<xsl:template match="node()|@*">
  <xsl:copy>
    <xsl:apply-templates select="node()|@*" />
  </xsl:copy>
</xsl:template>

</xsl:stylesheet>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org

iD8DBQFFq3Wkjv9P65BfOUMRAvP1AJ0TiAfUnVW+WlQ0+v++MCGd4XzVLwCfS9Kh
o5YrCzfz6CvNLZpZPzkaf9k=
=ZkVE
-----END PGP SIGNATURE-----
begin:vcard
fn;quoted-printable:Camille B=C3=A9gnis
n;quoted-printable:B=C3=A9gnis;Camille
org:NeoDoc
adr:Domaine du petit Arbois BP 88;;CEEI;Aix en Provence Cedex 4;;13545;France
email;internet:camille@neodoc.biz
tel;work:+33.4.42.22.62.35 
tel;cell:+33.6.33.15.10.23
note;quoted-printable:Rejoignez mon r=C3=A9seau sur viaduc:=0D=0A=
	=0D=0A=
	http://www.viaduc.com/invitationpersonnelle/002lm14bc0jlkfk
x-mozilla-html:FALSE
url:http://neodoc.biz
version:2.1
end:vcard



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