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


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