No Prob:

Q:
First, the name of the xml file is not known, so the generator has to go
figure it out, open it and the output it.

A:
<map:match pattern="*.xml" />
The * is a wildcard. Means the name is not known (variable), but as soon the extension 
xml is requested the match is true.

Q:
The second problem is that I need to wrap it with other XML tags

A: One way:
<map:match pattern="xml/*.xml">
<map:aggregate element="Container">
<map:part src="cocoon:/*.xml"/>
</map:aggregate>
<map:transform src="stylesheets/transform.xsl"/>
<map:serialize type="xml"/>
</map:match>

With the <map:aggregate element="Container">
<map:part src="cocoon:/*.xml"/>
</map:aggregate>
your xml is now wrapped into <container/>.


You have to thing in a pipeline! There is the end of the pipeline (transformed xml) 
and a way through a pipeline. You can aggregate as many elements of INTERNAL and 
EXTRENAL ressources as you like (best practice: one step after the other).

Other way with XSLT.
Regards
Thorsten
-=-=-=

-----Original Message-----
From: Scherler, Thorsten [mailto:[EMAIL PROTECTED]]
Sent: Tuesday 26 November 2002 10:43
To: [EMAIL PROTECTED]
Subject: AW: output XML


Helo Chris,

try
<snip>Is it possible to have a generator that opens an XML file and outputs
it
quite simply 'as is' ?
</snip>
<map:match pattern="*.xml">
        <map:read src="*.xml"/>
</map:match>

or with XSP
<!-- =========================== XSP================================ -->
<map:match pattern="xsp.xml">
        <map:generate type="xsp" src="xsp.xsp"/>
        <map:serialize type="xml"/>
</map:match>

King regards

-----Ursprüngliche Nachricht-----
Von: Shaw, Chris [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 26. November 2002 10:01
An: '[EMAIL PROTECTED]'
Betreff: output XML


Hi,

Simple question (I hope!)



I have such a thing written at the moment but when I use
contentHandler.characters(..) then all the XML tags get escaped into &lt;
and &gt; tags!

Thanks (in advance)

Chris
-=-=-=

Any e-mail message from the European Central Bank (ECB) is sent in good
faith but shall neither be binding nor construed as constituting a
commitment by the ECB except where provided for in a written agreement.
This e-mail is intended only for the use of the recipient(s) named above.
Any unauthorised disclosure, use or dissemination, either in whole or in
part, is prohibited.
If you have received this e-mail in error, please notify the sender
immediately via e-mail and delete this e-mail from your system.


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>


Any e-mail message from the European Central Bank (ECB) is sent in good faith but 
shall neither be binding nor construed as constituting a commitment by the ECB except 
where provided for in a written agreement.
This e-mail is intended only for the use of the recipient(s) named above. Any 
unauthorised disclosure, use or dissemination, either in whole or in part, is 
prohibited.
If you have received this e-mail in error, please notify the sender immediately via 
e-mail and delete this e-mail from your system.


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to