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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] RNC and inclusion in XSLT-generated XML documents astext?

[ Lists Home | Date Index | Thread Index ]

Klotz, Leigh wrote:

> I'd like to include RNC examples in XMLSPEC just as we include XSD examples,
> but I can't see how to do it.
> I do see this ancient message from Eric van der Vist about including
> plaintext with an XSLT extension function, but surely there is now a
> portable solution I've just overlooked?
> Is there a standard way to include RNC (as opposed to RNG) in XML documents
> as text?

I don't think there's anything specific to RNC about this: it's the same 
problem with any text format.  There's no portable way to do this in 
XSLT 1.0.

If I had to solve this problem without using any XSLT extension 
functions, I would probably:

- write a trivial script in some convenient language to collect all the 
examples and wrap them up into a single XML document like this

<examples>
<example file="ex01.rnc">
<!-- RNC with < and & properly escaped -->
</example>
<example file="ex02.rnc">
...
</example>
</examples>

- then run XSLT using document() on the XML file with the collected examples

If that doesn't work because there's no way to identify the set of 
needed filenames, then I would add an initial step that runs an XSLT 
transformation on the input document that outputs the list of filenames 
as a text file, then use this text file as input to my script.

James





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS