Randy Presuhn wrote:
> Hi -
> 
>> From: "Julian Reschke" <[email protected]>
>> To: "Randy Presuhn" <[email protected]>
>> Cc: "IETF Discussion Mailing List" <[email protected]>
>> 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: [email protected]
Work: [email protected]
_______________________________________________
Ietf mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/ietf

Reply via email to