Hi, I am very new in cocoon and i have got a big problem ...
I have a xml file with svg elements included, and i use fragment extractor to separate the svg content. I have to serialize the svg to SVG format and make it read by the Adobe Viewer I don't know how to use the serilizer "svgxml", there's no examples and when i try to use it after a pipeline like <map:pipeline> <map:match pattern="svgtrial"> <map:generate src="xml-with-svg.xml"/> <map:transform type="extractor"/> <map:transform src="fragment-extractor.xsl"/> <map:serialize type="html"/> </map:match> <map:match pattern="*.svg"> <map:generate src="{1}" type="extractor"/> <map:serialize type="svgxml"/> </map:match> </map:pipeline> I have got a real html page with a embed tag, witch link to the good "*.svg" file but the source code of the svg is bad, it looks like <?xml ...?> <svg:svg width ....> <svg:rect .... <svg;circle ..... </svg:svg> so Adobe viewer can't read it, I didn't know what to do , so I read the mailing-list and find a way to only have tags <svg> and <svg:svg> with this mail : http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=103176230230148&w=2 This mail gave me a way to result this first problem : I have got a xml file which look like : <?xml version="1.0" encoding="ISO-8859-1"?> <html xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://datagram.nl/survey"> <head> </head> <body bgcolor="#801205"> <svg width="600" height="350" xmlns:actor="http://www.ircam.fr/actor" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs = "http://www.w3.org/2000/01/rdf-schema#" onload="producer()"> <metadata > ... </metadata> <script><![CDATA[ somescript ]]</script> <g > some XML </g> </svg> <player> some XML </player> </body> </html> and a pipeline like this : <map:pipeline> <map:match pattern="svgtrial"> <map:generate src="xml-with-svg.xml"/> <map:transform type="j-extractor"/> <map:transform src="fragment-extractor.xsl"/> <map:serialize type="html"/> </map:match> <map:match pattern="*.svg"> <map:generate src="{1}" type="extractor"/> <map:serialize type="xml"/> </map:match> </map:pipeline> It works good without the script elements and deliver the svg, but, the problem is that I dont know how to put a <script><![CDATA[ .... ]]></script> in my svg file, : If I put it directly in my xml-with-svg.xml file ( like the exemple below), under the element <svg>, after the extractor I obtain a svg file with thousands of CDATA section inside the script element More, I have no way to transform the file after the <map:generate src="{1}" type="extractor"/> with a transformer, ( even if I put an XSL "identity" between the generato and the seralizer of the svg) ( The CDATA must be with the svg, not in other places for my purpose) May someone will help me to find the solution ... Sam --------------------------------------------------------------------- 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]>