[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] php xml xsl transformation returning empty string
Hmm I thought the closing xml was well formed, I was wrong. Thanks
Now I dont get parsing errors now but the transformation is not returning anything new, just the comment segment as it was before sending it to rdfpic2html. I am trying to modify http://www.ozhiker.com/electronics/pjmt/ PJMT's JPEG.php to transform http://jigsaw.w3.org/rdfpic/ rdfpic xml in the comment segment of jpegs and return it to Example.php function Interpret_Comment_to_HTML( $jpeg_header_data ) { // Create a string to receive the output $output = ""; // read the comment segment $comment = get_jpeg_Comment( $jpeg_header_data ); // Check if the comment segment was valid if ( $comment !== FALSE ) { // Check if the string contains an indicator that there may be rdfpic metadata if (stristr($comment, 'PhotoRDF') !== FALSE) { $rdfpicdata = stristr($comment, '<?xml'); rdfpic2html( $rdfpicdata ); $output .= $rdfpichtml; } // Comment exists - add it to the output $output .= "<h2 class=\"JPEG_Comment_Main_Heading\">JPEG Comment</h2>\n"; $output .= "<p class=\"JPEG_Comment_Text\">$comment</p>\n"; } // Return the result return $output; } function rdfpic2html( $rdfpicdata ) { $arguments = array('/_rdf' => $rdfpicdata); $xsltproc = xslt_create(); xslt_set_encoding($xsltproc, 'ISO-8859-1'); $rdfpichtml = xslt_process($xsltproc, 'arg:/_rdf', 'rdfpic.xsl', NULL, $arguments); if (empty($rdfpichtml)) { die('XSLT processing error: '. xslt_error($xsltproc)); } xslt_free($xsltproc); return $rdfpichtml; }
Aloha, Eric
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|