W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > July 2007

We need something to generate a document from an option or a p:* function

From: Innovimax SARL <innovimax@gmail.com>
Date: Tue, 24 Jul 2007 17:47:40 +0200
Message-ID: <546c6c1c0707240847q7d25b650k3479f386950f3831@mail.gmail.com>
To: "XProc WG" <public-xml-processing-model-wg@w3.org>


Looking around and around to solve some use case, I arrive to this conclusion

We need something to generate a simple XML document with values inside
evaluated from the value of options or p:* functions

Some consideration

AVT would help for attributes. Not for content element

We could always do a
  <p:option name="iteration-count" select="p:iteration-count()"/>
    <p:parameter name="param" select="$iteration-count"/>
    <p:input name="stylesheet">
        <root attr="{$param}" xsl:version="1.0"

which is honestly a heavy machinery for that

nor p:set-attributes, nor p:insert would help because they all wait
for a document as input (so the problem is before)

Another approach is

  <p:string-replace match="@attr">
    <p:input port="source">
       <root attr="FOO"/>
    <p:option name="replace" select="concat('&apos;',
p:iteration-count(), '&apos;')"/>

It is still a bit tricky

Any thoughts on that points ?


Innovimax SARL
Consulting, Training & XML Development
9, impasse des Orteaux
75020 Paris
Tel : +33 9 52 475787
Fax : +33 1 4356 1746
RCS Paris 488.018.631
SARL au capital de 10.000 
Received on Tuesday, 24 July 2007 15:47:44 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:32:43 UTC