Hi, Kashif: If you look carefully at the namespaces, most of the p, span, input and other elements are not in the XHTML namespace. So, even though the local name is right, the browser won't recognize them as XHTML.
Try modifying the namespace of those elements in your XSLT transform and see if the browser renders them. Erik Hennum ________________________________________ From: [email protected] [[email protected]] on behalf of Khan, Kashif [[email protected]] Sent: Thursday, July 11, 2013 2:51 PM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] Applying XSLT on XML file using xdmp:xslt-invoke Mary this is what I get <?xml version="1.0" encoding="UTF-8"?> <html xmlns="http://www.w3.org/1999/xhtml"> <title>HTML Transformation</title> <p xmlns=""> <img src="images/MNMTPG2_SE_062_3T_V1_ANS.jpg" alt=""/> <p xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns="http://www.imsglobal.org/xsd/imsqti_v2p1"> <span xmlns="http://www.harcourt.com/HSP"> <math:math> <math:munder accentunder="true"> <math:mn>5</math:mn> <math:mo stretchy="true">_</math:mo> </math:munder> <math:mn>9</math:mn> </math:math> </span> </p> <p xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns="http://www.imsglobal.org/xsd/imsqti_v2p1">What is the value of the underlined digit?</p> </p> <input type="radio" value="a" xmlns="">5<br/></input> <input type="radio" value="b" xmlns="">30<br/></input> <input type="radio" value="c" xmlns="">50<br/></input> <input type="radio" value="d" xmlns="">900<br/></input> <input type="submit" name="submit" xmlns=""/> </html> ‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹‹ Kashif Khan, PMI-ACP Sr. Solution Architect Publishing Technology Houghton Mifflin Harcourt 9400 South Park Center Loop Orlando, FL 32819 Office: 407.345.3420 Mobile: 407.949.4697 hmhco.com On 7/11/13 5:36 PM, "Mary Holstege" <[email protected]> wrote: >On Thu, 11 Jul 2013 14:10:02 -0700, Khan, Kashif <[email protected]> >wrote: > >> Thanks Greet I have made some head way after seeing your response. I >>just save the file as transformaed.xhtml INSTEAD of transformed.html and >>it started working. Below is the code that is now working in query >>console >> >> let $x := xdmp:xslt-invoke("/pipelines/HTML.xsl", >>doc("/ancillary/20130626114719392MXENM08AAS2X_SE_080_03.xml")) >> return xdmp:document-insert('/ancillary/html/transformaed.xhtml', $x, >>xdmp:default-permissions(), () ) >> >> Now when I am integrating this approach in CPF I am back to the same >>problem where all the html tags are getting stripped out. Below is the >>action file for my pipeline. I have tried using xsl:output and it does >>not seem to help. When I use xdmp:quote it starts throwing error. > >The format of a document stored via xdmp:document-insert >is not determined by its URI, only by the content. >So if you give it XML, it is saved as XML; if you >give it text, it is saved as text. > >What is your stylesheet producing? What output >method. > >So I would back up and verify that it isn't getting >saved correctly, because I suspect the issue is >how the content is being displayed. What you >describe looks like what a browser does when it >is given XML that it doesn't recognize as HTML. >QConsole has a lot of layers of interpretation >between you and the actual results, so it can >mislead you sometimes. > >What does the raw text output show you? >What does xdmp:quote(doc("/ancillary/html/transformed.html")) >show you? > >//Mary >_______________________________________________ >General mailing list >[email protected] >http://developer.marklogic.com/mailman/listinfo/general > _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
