Re: Automatically updated Table of Contents with Nroff

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Randy Presuhn wrote:
> Hi -
> 
>> From: "Julian Reschke" <julian.reschke@xxxxxx>
>> To: "Randy Presuhn" <randy_presuhn@xxxxxxxxxxxxxx>
>> Cc: "IETF Discussion Mailing List" <ietf@xxxxxxxx>
>> Sent: Wednesday, July 15, 2009 10:13 AM
>> Subject: Re: Automatically updated Table of Contents with Nroff
> ...
>> And of course you can do that with xml2rfc as well; just automate the 
>> process of converting the source file to something that can be included 
>> into the XML source using the standard XML include mechanisms.
> ....
> 
> I couldn't find such mechanisms described anywhere the first time I used xml2rfc.
> I just looked at the W3C website XML pages, and still am unable to find them.
> How does one do a simple ".so" or a "#include" in XML?

[...]
<references title="Normative References"
xmlns:xi="http://www.w3.org/2001/XInclude";>
  <xi:include
xi:href="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml";
/>
[...]

xml2rfc does not support xinclude, so you have to generate an
intermediate file:

xsltproc --xinclude -o ouput.xml dup.xslt input.xml

Here's the dup.xslt file:

<?xml version="1.0" ?>
<!--
   Duplicate a document, without the comments
  -->
<stylesheet version="1.0" xmlns="http://www.w3.org/1999/XSL/Transform";>
  <output method="xml" version="1.0" encoding="UTF-8" indent="yes" />
  <template match="* | text() | processing-instruction('rfc') | @*">
    <copy>
      <apply-templates select="@* | * | text() |
processing-instruction('rfc') " />
    </copy>
  </template>
</stylesheet>


-- 
Marc Petit-Huguenin
Home: marc@xxxxxxxxxxxxxxxxxx
Work: petithug@xxxxxxx
_______________________________________________

Ietf@xxxxxxxx
https://www.ietf.org/mailman/listinfo/ietf

[Index of Archives]     [IETF Annoucements]     [IETF]     [IP Storage]     [Yosemite News]     [Linux SCTP]     [Linux Newbies]     [Fedora Users]