Hi Marcus,
Marcus schrieb: > In my opinion this seems to be straight forward how something like that > should work, doesn't it? > Query, Transform, Adding XForm-control, Put it into a new page, and > tadaaa - A result-page showing exactly the searched data in a good > layout with many links on it to get more details information through > linked documents... in my opinion the single critical point is that you're trying to create the resulting xforms view using an xslt template. I searched a little, but found no way to do that. Here is a way that worked for me, but it uses a "hard-coded" xforms view to display the result data. The XPL uses a static XML file as datasource, but that can easily replaced with the eXist output. The page-flow contains: <page id="xsl-view" path-info="/xsl-view" model="/pages/xsl-view/xsl-view.xpl" view="/pages/xsl-view/xsl-view.xhtml" /> Under WEB-INF/resources, there's a directory named pages/xsl-view containing the xsl-view.xsl, xsl-view.xhtml and xmldata.xml files as they are attached in a zip file. The datasource xmldata.xml is the search-result from message <B54189FCDAA04B3985AEE3DC7025AAD1@Vampy> with a ("faked") exist namespace. HTH florian -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws xsl-view.zip (3K) Download Attachment |
Hi Florian,
get the exist result as normal instance and hardcode an xforms view is possible, but in my case not the best way. The problem is - when i finish my exam the project should still work and must be changeable for someone not so confirm with OF, but XSL Stylesheets can be build with userfriendly programms - thats the reason why i try to do this with XSL :-( Where can i find more information about the xxforms:serialize(node*,'html'). Are html and text the only possible options? Where is this function hardcoded? Maybe i could implement another option that will leave the xforms-tags during serialize? My this be possible? Thanks, Marcus ----- Original Message ----- From: "Florian Schmitt" <[hidden email]> To: <[hidden email]> Sent: Thursday, May 17, 2007 1:11 AM Subject: Re: [ops-users] Display HTML-Tags right? > Hi Marcus, > > Marcus schrieb: > >> In my opinion this seems to be straight forward how something like that >> should work, doesn't it? >> Query, Transform, Adding XForm-control, Put it into a new page, and >> tadaaa - A result-page showing exactly the searched data in a good >> layout with many links on it to get more details information through >> linked documents... > > in my opinion the single critical point is that you're trying to create > the resulting xforms view using an xslt template. I searched a little, > but found no way to do that. Here is a way that worked for me, but it > uses a "hard-coded" xforms view to display the result data. The XPL uses > a static XML file as datasource, but that can easily replaced with the > eXist output. > > The page-flow contains: > > <page id="xsl-view" path-info="/xsl-view" > model="/pages/xsl-view/xsl-view.xpl" > view="/pages/xsl-view/xsl-view.xhtml" /> > > Under WEB-INF/resources, there's a directory named pages/xsl-view > containing the xsl-view.xsl, xsl-view.xhtml and xmldata.xml files as > they are attached in a zip file. > > The datasource xmldata.xml is the search-result from message > <B54189FCDAA04B3985AEE3DC7025AAD1@Vampy> with a ("faked") exist namespace. > > > HTH > florian > -------------------------------------------------------------------------------- > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
In reply to this post by Marcus-2
Marcus,
It's nice that you are sending all these details, but going through them and understanding them in the abstract really takes a lot of time. What would be better would be to attach a zip of a very simple application which we can simply unzip under RESOURCES/apps/ and run to see the problem and attempt to find a solution. If you do this, don't even include the eXist layer: run your app, extract the output of the eXist layer, and save it as a static file. You get the idea: make it as easy as possible for somebody to run the code and find a solution. Hopefully this is only a page flow with one entry, a static file containing the result from eXist, an XPL file and/or XSLT and/or XForms document. Then somebody can do: * Unzip * Hit http://localhost:8080/ops/marcus And see the result. -Erik Marcus wrote: > Hi Erik, hi all the others tried to help so far (Florian, Ryan) > > let me say in the first place, that i appreciate it very much, that you > guys are trying to help me and spending your time in trying to > understand my confused mails and my worse english. Thank you for all you > do!!! But i'm still lost :-( > My english isn't that good, that i could probably find the right words > to explain the full exact situation :-(( > I'm very sorry for that and that this causees so much confusion :-( > > I'll try it one more time to explain where exactly my problem lies and i > hope that would make things a bit clearer.... > So please think of the following szenario: > > 1. Search.xhtml: > A Page in my webapp, showing all menus, the language-option and the > stuff i could include with the theme-widgets. > A singel input-field for fulltextsearch and a submit button. By entering > text to the field you get a hand full of suggestions from the > database-index starting with the enterd string. Push the button will > start the submission for searching. > > 2. My submission: > <xforms:submission id="search01" > ref="xxforms:instance('search01-instance')" > method="get" action="/search/service/search01" > replace="all" f:url-type="resource"/> > > 3. My page-flow: > <page id="search01" path-info="/search/service/search01" > model="search01.xpl" view="blank.xhtml" > default-submission="parameters.xml"> > <setvalue ref="/parameters/search-criteria" > parameter="search-criteria"/> > </page> > > 4. My search01.xpl: > <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" > xmlns:oxf="http://www.orbeon.com/oxf/processors" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:xdb="http://orbeon.org/oxf/xml/xmldb"> > <p:param name="instance" type="input"/> > <p:param name="data" type="output"/> > <!-- Create search query for exist --> > <p:processor name="oxf:xslt-2.0"> > <p:input name="data" href="#instance"/> > <p:input name="config"> > <xdb:query xsl:version="2.0" collection="/db/kkbib/forms"> > xquery version "1.0"; > declare namespace > xmldb="http://exist-db.org/xquery/xmldb"; > import module namespace > t="http://exist-db.org/xquery/text"; > declare namespace > fn="http://www.w3.org/2003/05/xpath-functions"; > declare option exist:serialize > "highlight-matches=elements method=xhtml media-type=application/xhtml+xml"; > <!-- create tokenized values --> > <xsl:variable name="search-criteria"> > <xsl:choose> > <xsl:when test="contains(//search-criteria,' ')"> > ( > <xsl:for-each > select="tokenize(//search-criteria,' ')"> > '<xsl:value-of select="."/>' > <xsl:if test="not(position() = > last())">,</xsl:if> > </xsl:for-each> > ) > </xsl:when> > <xsl:otherwise> > '<xsl:value-of select="//search-criteria"/>' > </xsl:otherwise> > </xsl:choose> > </xsl:variable> > <result> > <term> > <xsl:value-of select="$search-criteria"/> > </term> > <item>{ > let $hits := > collection('/db/kkbib/forms/SIG')//form[text:match-all(.,<xsl:value-of > select="$search-criteria"/>)] > for $hit in $hits > return > $hit > }</item> > </result> > </xdb:query> > </p:input> > <p:output name="data" id="search-query"/> > </p:processor> > <!-- query exist --> > <p:processor name="oxf:xmldb-query"> > <p:input name="datasource" href="datasource.xml"/> > <p:input name="query" href="#search-query"/> > <p:output name="data" id="search-result"/> > </p:processor> > <!-- Transform the results via XSLT --> > <p:processor name="oxf:xslt"> > <p:input name="config" href="layout-table.xsl"/> > <p:input name="data" href="#search-result"/> > <p:output name="data" ref="data"/> > </p:processor> > </p:config> > > > 5. My layout-table.xsl: > <?xml version="1.0" encoding="UTF-8"?> > <xsl:stylesheet version="2.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:fn="http://www.w3.org/2005/xpath-functions" > xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" > xmlns:exist="http://exist.sourceforge.net/NS/exist" > xmlns:xforms="http://www.w3.org/2002/xforms" > xmlns="http://www.w3.org/1999/xhtml" > xmlns:xi="http://www.w3.org/2001/XInclude" > xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" > > <xsl:output version="1.0" encoding="UTF-8" indent="yes" > method="xhtml" media-type="text/html"/> > > <xsl:template match="exist:match"> > <span class="xml-match"> > <xsl:value-of select="."/> > </span> > </xsl:template> > > <xsl:template match="/"> > <table><tr><td> > <xsl:for-each select="result"> > <xsl:for-each select="term"> > <span style="font-style:italic; ">Suchbegriff: </span> > <xsl:apply-templates select="."/> > </xsl:for-each> > <xsl:for-each select="item"> > <xsl:for-each select="form"> > <xsl:for-each select="Datensatz"> > <br /> > <h6> > <xsl:for-each select="ID"> > <span style="font-style:italic; > ">Datensatz-ID: </span> > <xsl:apply-templates /> > </xsl:for-each> > </h6> > <xsl:for-each select="ASig"> > <br /> > <table border="1" width="100%"> > <tbody> > <tr> > <td align="center" colspan="2"> > <h1> > <span > style="font-style:italic; ">Alte Signatur: </span> > <xsl:for-each > select="ASTitel"> > <xsl:apply-templates /> > </xsl:for-each> > </h1> > </td> > </tr> > <tr> > <td colspan="2" /> > </tr> > <tr> > <td align="center" colspan="2"> > <h2>Mittelalterl. > Bibliothekskatalog (MBK)</h2> > </td> > </tr> > <tr> > <td colspan="2"> > <xsl:for-each select="MBK"> > <xsl:for-each > select="KatEintrag"> > <table border="1" > width="100%"> > <tbody> > <tr> > <td > width="200"> > > <h4>Text</h4> > </td> > <td> > <h4> > > <xsl:for-each select="Inhalt"> > > <!-- Here i try to put the xforms:output around the content which > includes the embedded html! --> > > <xforms:output mediatype="text/html"> > > <xsl:apply-templates /> > > </xforms:output> > > > </xsl:for-each> > </h4> > </td> > </tr> > <tr> > <td > width="200"> > > <h4>textkrit. Apparat (MBK III/3)</h4> > </td> > <td> > <h4> > > <xsl:for-each select="Apparat"> > > <xsl:apply-templates /> > > </xsl:for-each> > </h4> > </td> > </tr> > </tbody> > </table> > </xsl:for-each> > </xsl:for-each> > </td> > </tr> > > ... <!-- left a lot of other fields out to save space! --> > > <tr> > <td align="center" colspan="2"> > <h2>Bemerkungen</h2> > </td> > </tr> > <tr> > <td colspan="2"> > <xsl:for-each > select="Bemerkungen"> > <xsl:apply-templates /> > </xsl:for-each> > </td> > </tr> > </tbody> > </table> > </xsl:for-each> > <br /> > > ... <!-- left a lot of other fields out to save space! --> > > </xsl:for-each> > </xsl:for-each> > </xsl:for-each> > </xsl:for-each> > </td></tr></table> > </xsl:template> > </xsl:stylesheet> > > > 6. The result of the XPL that i could add to the resulst-instance on my > blank.xhtml.(copied from the instance inspector) > --> :result-instance() > > <table xml:base="input:data" > xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" > xmlns:exist="http://exist.sourceforge.net/NS/exist" > xmlns="http://www.w3.org/1999/xhtml" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:xforms="http://www.w3.org/2002/xforms" > xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" > xmlns:ev="http://www.w3.org/2001/xml-events" > xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" > xmlns:xi="http://www.w3.org/2001/XInclude" > xmlns:fn="http://www.w3.org/2005/xpath-functions" > xmlns:f="http://orbeon.org/oxf/xml/formatting" > xmlns:xhtml="http://www.w3.org/1999/xhtml"> > <tr><td> > > <span style="font-style:italic; ">Suchbegriff:</span>'test'<br/> > <h6><span style="font-style:italic; ">Datensatz-ID:</span>1</h6><br/> > <table border="1" width="100%"><tbody> > <tr><td align="center" colspan="2"><h1><span style="font-style:italic; > ">Alte Signatur:</span>asd</h1></td></tr> > <tr><td colspan="2"/></tr><tr><td align="center" > colspan="2"><h2>Mittelalterl. Bibliothekskatalog (MBK)</h2></td></tr> > <tr><td colspan="2"><table border="1" width="100%"><tbody> > <tr><td width="200"><h4>Text</h4></td><td><h4> > > <xforms:output mediatype="text/html"> > <span class="xml-match">Test</span><strong><span > class="xml-match">Test</span></strong> <em><span > class="xml-match">Test</span><br /></em><div align="center"><span > class="xml-match">Test</span><br /><div > align="left">x<sub>2<sup>4</sup></sub><sup>3</sup> y<sup>3</sup><br > /><ul><li>1</li><li>2</li><li>3</li></ul><font color="#ff0000">Rot<br > /></font></div></div> > </xforms:output> > > </h4></td></tr> > <tr><td width="200"><h4>textkrit. Apparat (MBK > III/3)</h4></td><td><h4/></td></tr> > <tr><td width="200"><h4>Stellennachweis (MBK > III/3)</h4></td><td><h4/></td></tr> > <tr><td height="22" width="200"><h4>Volltext</h4></td><td > height="22"><h4/></td></tr> > </tbody></table></td></tr> > > ... <!-- left a lot of other fields out to save space! --> > > </td></tr></table> > > > 7. My blank.xhtml: > > <html xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:xforms="http://www.w3.org/2002/xforms" > xmlns:ev="http://www.w3.org/2001/xml-events" > xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" > xmlns:f="http://orbeon.org/oxf/xml/formatting" > xmlns:xhtml="http://www.w3.org/1999/xhtml" > xmlns:xi="http://www.w3.org/2001/XInclude" > xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns="http://www.w3.org/1999/xhtml" > xmlns:exist="http://exist.sourceforge.net/NS/exist" xsl:version="2.0"> > <head> > <link rel="stylesheet" type="text/css" > href="/apps/forms/style.css"/> > <!-- Main XForms model --> > <xforms:model id="common-model" > xmlns:xforms="http://www.w3.org/2002/xforms"> > <xforms:action ev:event="xforms-ready"> > </xforms:action> > <!-- Instance containing the page parameters --> > <xforms:instance id="parameters-instance"> > <xi:include href="input:instance" xxi:omit-xml-base="true"/> > </xforms:instance> > > <xforms:instance id="result-instance"> > <xi:include href="input:data"/> > </xforms:instance> > > </xforms:model> > <!-- Model to handle persistence --> > <xi:include href="oxf:/apps/search/common/persistence-model.xml" > xxi:omit-xml-base="true"/> > <!-- Model to handle resources --> > <xi:include href="oxf:/apps/search/common/resources-model.xml" > xxi:omit-xml-base="true"/> > > <title>Result</title> > </head> > <body> > <xhtml:p> > <xforms:output > value="xxforms:serialize(instance('result-instance'),'html')" > mediatype="text/html" /> > </xhtml:p><hr/> > <xhtml:p> > <xforms:output > value="xxforms:serialize(instance('result-instance'),'text')" > mediatype="text/html" /> > </xhtml:p><hr/> > <widget:xforms-instance-inspector > xmlns:widget="http://orbeon.org/oxf/xml/widget"/> > </body> > </html> > > --> <xforms:output > value="xxforms:serialize(instance('result-instance'),'html')" > mediatype="text/html" /> > This line display the right layout on my new page, all fields, all data, > except the embedded html :( > Looking to the source code, everything from the instance was inserted, > except the <xforms:output media-type="text/html">-Tag - also the content > of this field, but any more surrounded by the xforms:output, that should > give me the right display of the embedded html as you said :-( > > --> <xforms:output > value="xxforms:serialize(instance('result-instance'),'text')" > mediatype="text/html" /> > This line display all the content, but without any table structure or > any other layouts. Except the embedded-html - that content is now > displayed correct, but in this case useless, because the hole page has > no ,ayout anymore :-( > > > And both option do NOT leave the xforms-control intact, but wipe them > away - so my transforming and including of all xform-controls is useless > unless i don't get them into my new page so that the will work :-(( But > i need those xform-controls for displaying the embedded html-tags as you > said, and also for the triggers, to link some of the data to other > documents, that should be loaded when clicking on those links :-( > Because of that i asked about the submissions through javascript, cause > i think <a>-tags will work so far. Of course i would prefer > <xform-trigger> now, after you gave me more information on that, but for > that, i need those xform-controls to work that where insert by my > stylesheet through the xslt-process. > > I hope that makes my problem more clear, i don't know what i else can > do, i'm lost. > The aim seems to be so near, while all i need is inside that > result-instance you see - but i could not get it INTO my blank.xhtml so > that the xform-control will work. > > In my opinion this seems to be straight forward how something like that > should work, doesn't it? > Query, Transform, Adding XForm-control, Put it into a new page, and > tadaaa - A result-page showing exactly the searched data in a good > layout with many links on it to get more details information through > linked documents... > Am i stupid to think it could and should be that easy? :-(( Than forgive > me for causing you so much problems :-( > > Thanks for every help you gave me, > Marcus > > > -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Hi,
thanks and i'll try to build a small sample-app like you wished. Thanks and you'll here from me. I try to hurry :-) The example exist-result could be stored in a simple xml file i think and attached to to XPL, thats right? So instead of query the db, just load the static file i suppose. That will do? You'll get it! Thanks a lot! Marcus ----- Original Message ----- From: "Erik Bruchez" <[hidden email]> To: <[hidden email]> Sent: Thursday, May 17, 2007 6:19 PM Subject: Re: [ops-users] Display HTML-Tags right? > Marcus, > > It's nice that you are sending all these details, but going through them > and understanding them in the abstract really takes a lot of time. > > What would be better would be to attach a zip of a very simple > application which we can simply unzip under RESOURCES/apps/ and run to > see the problem and attempt to find a solution. > > If you do this, don't even include the eXist layer: run your app, > extract the output of the eXist layer, and save it as a static file. You > get the idea: make it as easy as possible for somebody to run the code > and find a solution. Hopefully this is only a page flow with one entry, > a static file containing the result from eXist, an XPL file and/or XSLT > and/or XForms document. > > Then somebody can do: > > * Unzip > * Hit http://localhost:8080/ops/marcus > > And see the result. > > -Erik > > Marcus wrote: >> Hi Erik, hi all the others tried to help so far (Florian, Ryan) >> >> let me say in the first place, that i appreciate it very much, that you >> guys are trying to help me and spending your time in trying to >> understand my confused mails and my worse english. Thank you for all you >> do!!! But i'm still lost :-( >> My english isn't that good, that i could probably find the right words >> to explain the full exact situation :-(( >> I'm very sorry for that and that this causees so much confusion :-( >> >> I'll try it one more time to explain where exactly my problem lies and i >> hope that would make things a bit clearer.... >> So please think of the following szenario: >> >> 1. Search.xhtml: >> A Page in my webapp, showing all menus, the language-option and the >> stuff i could include with the theme-widgets. >> A singel input-field for fulltextsearch and a submit button. By entering >> text to the field you get a hand full of suggestions from the >> database-index starting with the enterd string. Push the button will >> start the submission for searching. >> >> 2. My submission: >> <xforms:submission id="search01" >> ref="xxforms:instance('search01-instance')" >> method="get" action="/search/service/search01" >> replace="all" f:url-type="resource"/> >> >> 3. My page-flow: >> <page id="search01" path-info="/search/service/search01" >> model="search01.xpl" view="blank.xhtml" >> default-submission="parameters.xml"> >> <setvalue ref="/parameters/search-criteria" >> parameter="search-criteria"/> >> </page> >> >> 4. My search01.xpl: >> <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" >> xmlns:oxf="http://www.orbeon.com/oxf/processors" >> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >> xmlns:xdb="http://orbeon.org/oxf/xml/xmldb"> >> <p:param name="instance" type="input"/> >> <p:param name="data" type="output"/> >> <!-- Create search query for exist --> >> <p:processor name="oxf:xslt-2.0"> >> <p:input name="data" href="#instance"/> >> <p:input name="config"> >> <xdb:query xsl:version="2.0" collection="/db/kkbib/forms"> >> xquery version "1.0"; >> declare namespace >> xmldb="http://exist-db.org/xquery/xmldb"; >> import module namespace >> t="http://exist-db.org/xquery/text"; >> declare namespace >> fn="http://www.w3.org/2003/05/xpath-functions"; >> declare option exist:serialize >> "highlight-matches=elements method=xhtml >> media-type=application/xhtml+xml"; >> <!-- create tokenized values --> >> <xsl:variable name="search-criteria"> >> <xsl:choose> >> <xsl:when test="contains(//search-criteria,' ')"> >> ( >> <xsl:for-each >> select="tokenize(//search-criteria,' ')"> >> '<xsl:value-of select="."/>' >> <xsl:if test="not(position() = >> last())">,</xsl:if> >> </xsl:for-each> >> ) >> </xsl:when> >> <xsl:otherwise> >> '<xsl:value-of select="//search-criteria"/>' >> </xsl:otherwise> >> </xsl:choose> >> </xsl:variable> >> <result> >> <term> >> <xsl:value-of select="$search-criteria"/> >> </term> >> <item>{ >> let $hits := >> collection('/db/kkbib/forms/SIG')//form[text:match-all(.,<xsl:value-of >> select="$search-criteria"/>)] >> for $hit in $hits >> return >> $hit >> }</item> >> </result> >> </xdb:query> >> </p:input> >> <p:output name="data" id="search-query"/> >> </p:processor> >> <!-- query exist --> >> <p:processor name="oxf:xmldb-query"> >> <p:input name="datasource" href="datasource.xml"/> >> <p:input name="query" href="#search-query"/> >> <p:output name="data" id="search-result"/> >> </p:processor> >> <!-- Transform the results via XSLT --> >> <p:processor name="oxf:xslt"> >> <p:input name="config" href="layout-table.xsl"/> >> <p:input name="data" href="#search-result"/> >> <p:output name="data" ref="data"/> >> </p:processor> >> </p:config> >> >> >> 5. My layout-table.xsl: >> <?xml version="1.0" encoding="UTF-8"?> >> <xsl:stylesheet version="2.0" >> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >> xmlns:xs="http://www.w3.org/2001/XMLSchema" >> xmlns:fn="http://www.w3.org/2005/xpath-functions" >> xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" >> xmlns:exist="http://exist.sourceforge.net/NS/exist" >> xmlns:xforms="http://www.w3.org/2002/xforms" >> xmlns="http://www.w3.org/1999/xhtml" >> xmlns:xi="http://www.w3.org/2001/XInclude" >> xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" > >> <xsl:output version="1.0" encoding="UTF-8" indent="yes" >> method="xhtml" media-type="text/html"/> >> >> <xsl:template match="exist:match"> >> <span class="xml-match"> >> <xsl:value-of select="."/> >> </span> >> </xsl:template> >> >> <xsl:template match="/"> >> <table><tr><td> >> <xsl:for-each select="result"> >> <xsl:for-each select="term"> >> <span style="font-style:italic; ">Suchbegriff: </span> >> <xsl:apply-templates select="."/> >> </xsl:for-each> >> <xsl:for-each select="item"> >> <xsl:for-each select="form"> >> <xsl:for-each select="Datensatz"> >> <br /> >> <h6> >> <xsl:for-each select="ID"> >> <span style="font-style:italic; >> ">Datensatz-ID: </span> >> <xsl:apply-templates /> >> </xsl:for-each> >> </h6> >> <xsl:for-each select="ASig"> >> <br /> >> <table border="1" width="100%"> >> <tbody> >> <tr> >> <td align="center" colspan="2"> >> <h1> >> <span >> style="font-style:italic; ">Alte Signatur: </span> >> <xsl:for-each >> select="ASTitel"> >> <xsl:apply-templates >> /> >> </xsl:for-each> >> </h1> >> </td> >> </tr> >> <tr> >> <td colspan="2" /> >> </tr> >> <tr> >> <td align="center" colspan="2"> >> <h2>Mittelalterl. >> Bibliothekskatalog (MBK)</h2> >> </td> >> </tr> >> <tr> >> <td colspan="2"> >> <xsl:for-each select="MBK"> >> <xsl:for-each >> select="KatEintrag"> >> <table border="1" >> width="100%"> >> <tbody> >> <tr> >> <td >> width="200"> >> >> <h4>Text</h4> >> </td> >> <td> >> <h4> >> >> <xsl:for-each select="Inhalt"> >> >> <!-- Here i try to put the xforms:output around the content which >> includes the embedded html! --> >> >> <xforms:output mediatype="text/html"> >> >> <xsl:apply-templates /> >> >> </xforms:output> >> >> >> </xsl:for-each> >> </h4> >> </td> >> </tr> >> <tr> >> <td >> width="200"> >> >> <h4>textkrit. Apparat (MBK III/3)</h4> >> </td> >> <td> >> <h4> >> >> <xsl:for-each select="Apparat"> >> >> <xsl:apply-templates /> >> >> </xsl:for-each> >> </h4> >> </td> >> </tr> >> </tbody> >> </table> >> </xsl:for-each> >> </xsl:for-each> >> </td> >> </tr> >> >> ... <!-- left a lot of other fields out to save space! --> >> >> <tr> >> <td align="center" colspan="2"> >> <h2>Bemerkungen</h2> >> </td> >> </tr> >> <tr> >> <td colspan="2"> >> <xsl:for-each >> select="Bemerkungen"> >> <xsl:apply-templates /> >> </xsl:for-each> >> </td> >> </tr> >> </tbody> >> </table> >> </xsl:for-each> >> <br /> >> >> ... <!-- left a lot of other fields out to save space! --> >> >> </xsl:for-each> >> </xsl:for-each> >> </xsl:for-each> >> </xsl:for-each> >> </td></tr></table> >> </xsl:template> >> </xsl:stylesheet> >> >> >> 6. The result of the XPL that i could add to the resulst-instance on my >> blank.xhtml.(copied from the instance inspector) >> --> :result-instance() >> >> <table xml:base="input:data" >> xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" >> xmlns:exist="http://exist.sourceforge.net/NS/exist" >> xmlns="http://www.w3.org/1999/xhtml" >> xmlns:xs="http://www.w3.org/2001/XMLSchema" >> xmlns:xforms="http://www.w3.org/2002/xforms" >> xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" >> xmlns:ev="http://www.w3.org/2001/xml-events" >> xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" >> xmlns:xi="http://www.w3.org/2001/XInclude" >> xmlns:fn="http://www.w3.org/2005/xpath-functions" >> xmlns:f="http://orbeon.org/oxf/xml/formatting" >> xmlns:xhtml="http://www.w3.org/1999/xhtml"> >> <tr><td> >> >> <span style="font-style:italic; ">Suchbegriff:</span>'test'<br/> >> <h6><span style="font-style:italic; ">Datensatz-ID:</span>1</h6><br/> >> <table border="1" width="100%"><tbody> >> <tr><td align="center" colspan="2"><h1><span style="font-style:italic; >> ">Alte Signatur:</span>asd</h1></td></tr> >> <tr><td colspan="2"/></tr><tr><td align="center" >> colspan="2"><h2>Mittelalterl. Bibliothekskatalog (MBK)</h2></td></tr> >> <tr><td colspan="2"><table border="1" width="100%"><tbody> >> <tr><td width="200"><h4>Text</h4></td><td><h4> >> >> <xforms:output mediatype="text/html"> >> <span class="xml-match">Test</span><strong><span >> class="xml-match">Test</span></strong> <em><span >> class="xml-match">Test</span><br /></em><div align="center"><span >> class="xml-match">Test</span><br /><div >> align="left">x<sub>2<sup>4</sup></sub><sup>3</sup> y<sup>3</sup><br >> /><ul><li>1</li><li>2</li><li>3</li></ul><font color="#ff0000">Rot<br >> /></font></div></div> >> </xforms:output> >> >> </h4></td></tr> >> <tr><td width="200"><h4>textkrit. Apparat (MBK >> III/3)</h4></td><td><h4/></td></tr> >> <tr><td width="200"><h4>Stellennachweis (MBK >> III/3)</h4></td><td><h4/></td></tr> >> <tr><td height="22" width="200"><h4>Volltext</h4></td><td >> height="22"><h4/></td></tr> >> </tbody></table></td></tr> >> >> ... <!-- left a lot of other fields out to save space! --> >> >> </td></tr></table> >> >> >> 7. My blank.xhtml: >> >> <html xmlns:xs="http://www.w3.org/2001/XMLSchema" >> xmlns:xforms="http://www.w3.org/2002/xforms" >> xmlns:ev="http://www.w3.org/2001/xml-events" >> xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" >> xmlns:f="http://orbeon.org/oxf/xml/formatting" >> xmlns:xhtml="http://www.w3.org/1999/xhtml" >> xmlns:xi="http://www.w3.org/2001/XInclude" >> xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" >> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >> xmlns="http://www.w3.org/1999/xhtml" >> xmlns:exist="http://exist.sourceforge.net/NS/exist" >> xsl:version="2.0"> >> <head> >> <link rel="stylesheet" type="text/css" >> href="/apps/forms/style.css"/> >> <!-- Main XForms model --> >> <xforms:model id="common-model" >> xmlns:xforms="http://www.w3.org/2002/xforms"> >> <xforms:action ev:event="xforms-ready"> >> </xforms:action> >> <!-- Instance containing the page parameters --> >> <xforms:instance id="parameters-instance"> >> <xi:include href="input:instance" >> xxi:omit-xml-base="true"/> >> </xforms:instance> >> >> <xforms:instance id="result-instance"> >> <xi:include href="input:data"/> >> </xforms:instance> >> >> </xforms:model> >> <!-- Model to handle persistence --> >> <xi:include href="oxf:/apps/search/common/persistence-model.xml" >> xxi:omit-xml-base="true"/> >> <!-- Model to handle resources --> >> <xi:include href="oxf:/apps/search/common/resources-model.xml" >> xxi:omit-xml-base="true"/> >> >> <title>Result</title> >> </head> >> <body> >> <xhtml:p> >> <xforms:output >> value="xxforms:serialize(instance('result-instance'),'html')" >> mediatype="text/html" /> >> </xhtml:p><hr/> >> <xhtml:p> >> <xforms:output >> value="xxforms:serialize(instance('result-instance'),'text')" >> mediatype="text/html" /> >> </xhtml:p><hr/> >> <widget:xforms-instance-inspector >> xmlns:widget="http://orbeon.org/oxf/xml/widget"/> >> </body> >> </html> >> >> --> <xforms:output >> value="xxforms:serialize(instance('result-instance'),'html')" >> mediatype="text/html" /> >> This line display the right layout on my new page, all fields, all data, >> except the embedded html :( >> Looking to the source code, everything from the instance was inserted, >> except the <xforms:output media-type="text/html">-Tag - also the content >> of this field, but any more surrounded by the xforms:output, that should >> give me the right display of the embedded html as you said :-( >> >> --> <xforms:output >> value="xxforms:serialize(instance('result-instance'),'text')" >> mediatype="text/html" /> >> This line display all the content, but without any table structure or >> any other layouts. Except the embedded-html - that content is now >> displayed correct, but in this case useless, because the hole page has >> no ,ayout anymore :-( >> >> >> And both option do NOT leave the xforms-control intact, but wipe them >> away - so my transforming and including of all xform-controls is useless >> unless i don't get them into my new page so that the will work :-(( But >> i need those xform-controls for displaying the embedded html-tags as you >> said, and also for the triggers, to link some of the data to other >> documents, that should be loaded when clicking on those links :-( >> Because of that i asked about the submissions through javascript, cause >> i think <a>-tags will work so far. Of course i would prefer >> <xform-trigger> now, after you gave me more information on that, but for >> that, i need those xform-controls to work that where insert by my >> stylesheet through the xslt-process. >> >> I hope that makes my problem more clear, i don't know what i else can >> do, i'm lost. >> The aim seems to be so near, while all i need is inside that >> result-instance you see - but i could not get it INTO my blank.xhtml so >> that the xform-control will work. >> >> In my opinion this seems to be straight forward how something like that >> should work, doesn't it? >> Query, Transform, Adding XForm-control, Put it into a new page, and >> tadaaa - A result-page showing exactly the searched data in a good >> layout with many links on it to get more details information through >> linked documents... >> Am i stupid to think it could and should be that easy? :-(( Than forgive >> me for causing you so much problems :-( >> >> Thanks for every help you gave me, >> Marcus >> >> >> > > > -- > Orbeon Forms - Web Forms for the Enterprise Done the Right Way > http://www.orbeon.com/ > > -------------------------------------------------------------------------------- > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
In reply to this post by Erik Bruchez
Hi Erik,
finally i had time to build that extra test-app and i hope that will help to find a solution! Just unzip to RESOURCES/apps/ All files are in the subdir "marcus" Just add this to your main pfc and i hope it works! Thanks a lot for your help!!! Regards, Marcus ----- Original Message ----- From: "Erik Bruchez" <[hidden email]> To: <[hidden email]> Sent: Thursday, May 17, 2007 6:19 PM Subject: Re: [ops-users] Display HTML-Tags right? > Marcus, > > It's nice that you are sending all these details, but going through them > and understanding them in the abstract really takes a lot of time. > > What would be better would be to attach a zip of a very simple > application which we can simply unzip under RESOURCES/apps/ and run to > see the problem and attempt to find a solution. > > If you do this, don't even include the eXist layer: run your app, > extract the output of the eXist layer, and save it as a static file. You > get the idea: make it as easy as possible for somebody to run the code > and find a solution. Hopefully this is only a page flow with one entry, > a static file containing the result from eXist, an XPL file and/or XSLT > and/or XForms document. > > Then somebody can do: > > * Unzip > * Hit http://localhost:8080/ops/marcus > > And see the result. > > -Erik > > Marcus wrote: >> Hi Erik, hi all the others tried to help so far (Florian, Ryan) >> >> let me say in the first place, that i appreciate it very much, that you >> guys are trying to help me and spending your time in trying to >> understand my confused mails and my worse english. Thank you for all you >> do!!! But i'm still lost :-( >> My english isn't that good, that i could probably find the right words >> to explain the full exact situation :-(( >> I'm very sorry for that and that this causees so much confusion :-( >> >> I'll try it one more time to explain where exactly my problem lies and i >> hope that would make things a bit clearer.... >> So please think of the following szenario: >> >> 1. Search.xhtml: >> A Page in my webapp, showing all menus, the language-option and the >> stuff i could include with the theme-widgets. >> A singel input-field for fulltextsearch and a submit button. By entering >> text to the field you get a hand full of suggestions from the >> database-index starting with the enterd string. Push the button will >> start the submission for searching. >> >> 2. My submission: >> <xforms:submission id="search01" >> ref="xxforms:instance('search01-instance')" >> method="get" action="/search/service/search01" >> replace="all" f:url-type="resource"/> >> >> 3. My page-flow: >> <page id="search01" path-info="/search/service/search01" >> model="search01.xpl" view="blank.xhtml" >> default-submission="parameters.xml"> >> <setvalue ref="/parameters/search-criteria" >> parameter="search-criteria"/> >> </page> >> >> 4. My search01.xpl: >> <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" >> xmlns:oxf="http://www.orbeon.com/oxf/processors" >> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >> xmlns:xdb="http://orbeon.org/oxf/xml/xmldb"> >> <p:param name="instance" type="input"/> >> <p:param name="data" type="output"/> >> <!-- Create search query for exist --> >> <p:processor name="oxf:xslt-2.0"> >> <p:input name="data" href="#instance"/> >> <p:input name="config"> >> <xdb:query xsl:version="2.0" collection="/db/kkbib/forms"> >> xquery version "1.0"; >> declare namespace >> xmldb="http://exist-db.org/xquery/xmldb"; >> import module namespace >> t="http://exist-db.org/xquery/text"; >> declare namespace >> fn="http://www.w3.org/2003/05/xpath-functions"; >> declare option exist:serialize >> "highlight-matches=elements method=xhtml >> media-type=application/xhtml+xml"; >> <!-- create tokenized values --> >> <xsl:variable name="search-criteria"> >> <xsl:choose> >> <xsl:when test="contains(//search-criteria,' ')"> >> ( >> <xsl:for-each >> select="tokenize(//search-criteria,' ')"> >> '<xsl:value-of select="."/>' >> <xsl:if test="not(position() = >> last())">,</xsl:if> >> </xsl:for-each> >> ) >> </xsl:when> >> <xsl:otherwise> >> '<xsl:value-of select="//search-criteria"/>' >> </xsl:otherwise> >> </xsl:choose> >> </xsl:variable> >> <result> >> <term> >> <xsl:value-of select="$search-criteria"/> >> </term> >> <item>{ >> let $hits := >> collection('/db/kkbib/forms/SIG')//form[text:match-all(.,<xsl:value-of >> select="$search-criteria"/>)] >> for $hit in $hits >> return >> $hit >> }</item> >> </result> >> </xdb:query> >> </p:input> >> <p:output name="data" id="search-query"/> >> </p:processor> >> <!-- query exist --> >> <p:processor name="oxf:xmldb-query"> >> <p:input name="datasource" href="datasource.xml"/> >> <p:input name="query" href="#search-query"/> >> <p:output name="data" id="search-result"/> >> </p:processor> >> <!-- Transform the results via XSLT --> >> <p:processor name="oxf:xslt"> >> <p:input name="config" href="layout-table.xsl"/> >> <p:input name="data" href="#search-result"/> >> <p:output name="data" ref="data"/> >> </p:processor> >> </p:config> >> >> >> 5. My layout-table.xsl: >> <?xml version="1.0" encoding="UTF-8"?> >> <xsl:stylesheet version="2.0" >> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >> xmlns:xs="http://www.w3.org/2001/XMLSchema" >> xmlns:fn="http://www.w3.org/2005/xpath-functions" >> xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" >> xmlns:exist="http://exist.sourceforge.net/NS/exist" >> xmlns:xforms="http://www.w3.org/2002/xforms" >> xmlns="http://www.w3.org/1999/xhtml" >> xmlns:xi="http://www.w3.org/2001/XInclude" >> xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" > >> <xsl:output version="1.0" encoding="UTF-8" indent="yes" >> method="xhtml" media-type="text/html"/> >> >> <xsl:template match="exist:match"> >> <span class="xml-match"> >> <xsl:value-of select="."/> >> </span> >> </xsl:template> >> >> <xsl:template match="/"> >> <table><tr><td> >> <xsl:for-each select="result"> >> <xsl:for-each select="term"> >> <span style="font-style:italic; ">Suchbegriff: </span> >> <xsl:apply-templates select="."/> >> </xsl:for-each> >> <xsl:for-each select="item"> >> <xsl:for-each select="form"> >> <xsl:for-each select="Datensatz"> >> <br /> >> <h6> >> <xsl:for-each select="ID"> >> <span style="font-style:italic; >> ">Datensatz-ID: </span> >> <xsl:apply-templates /> >> </xsl:for-each> >> </h6> >> <xsl:for-each select="ASig"> >> <br /> >> <table border="1" width="100%"> >> <tbody> >> <tr> >> <td align="center" colspan="2"> >> <h1> >> <span >> style="font-style:italic; ">Alte Signatur: </span> >> <xsl:for-each >> select="ASTitel"> >> <xsl:apply-templates >> /> >> </xsl:for-each> >> </h1> >> </td> >> </tr> >> <tr> >> <td colspan="2" /> >> </tr> >> <tr> >> <td align="center" colspan="2"> >> <h2>Mittelalterl. >> Bibliothekskatalog (MBK)</h2> >> </td> >> </tr> >> <tr> >> <td colspan="2"> >> <xsl:for-each select="MBK"> >> <xsl:for-each >> select="KatEintrag"> >> <table border="1" >> width="100%"> >> <tbody> >> <tr> >> <td >> width="200"> >> >> <h4>Text</h4> >> </td> >> <td> >> <h4> >> >> <xsl:for-each select="Inhalt"> >> >> <!-- Here i try to put the xforms:output around the content which >> includes the embedded html! --> >> >> <xforms:output mediatype="text/html"> >> >> <xsl:apply-templates /> >> >> </xforms:output> >> >> >> </xsl:for-each> >> </h4> >> </td> >> </tr> >> <tr> >> <td >> width="200"> >> >> <h4>textkrit. Apparat (MBK III/3)</h4> >> </td> >> <td> >> <h4> >> >> <xsl:for-each select="Apparat"> >> >> <xsl:apply-templates /> >> >> </xsl:for-each> >> </h4> >> </td> >> </tr> >> </tbody> >> </table> >> </xsl:for-each> >> </xsl:for-each> >> </td> >> </tr> >> >> ... <!-- left a lot of other fields out to save space! --> >> >> <tr> >> <td align="center" colspan="2"> >> <h2>Bemerkungen</h2> >> </td> >> </tr> >> <tr> >> <td colspan="2"> >> <xsl:for-each >> select="Bemerkungen"> >> <xsl:apply-templates /> >> </xsl:for-each> >> </td> >> </tr> >> </tbody> >> </table> >> </xsl:for-each> >> <br /> >> >> ... <!-- left a lot of other fields out to save space! --> >> >> </xsl:for-each> >> </xsl:for-each> >> </xsl:for-each> >> </xsl:for-each> >> </td></tr></table> >> </xsl:template> >> </xsl:stylesheet> >> >> >> 6. The result of the XPL that i could add to the resulst-instance on my >> blank.xhtml.(copied from the instance inspector) >> --> :result-instance() >> >> <table xml:base="input:data" >> xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" >> xmlns:exist="http://exist.sourceforge.net/NS/exist" >> xmlns="http://www.w3.org/1999/xhtml" >> xmlns:xs="http://www.w3.org/2001/XMLSchema" >> xmlns:xforms="http://www.w3.org/2002/xforms" >> xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" >> xmlns:ev="http://www.w3.org/2001/xml-events" >> xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" >> xmlns:xi="http://www.w3.org/2001/XInclude" >> xmlns:fn="http://www.w3.org/2005/xpath-functions" >> xmlns:f="http://orbeon.org/oxf/xml/formatting" >> xmlns:xhtml="http://www.w3.org/1999/xhtml"> >> <tr><td> >> >> <span style="font-style:italic; ">Suchbegriff:</span>'test'<br/> >> <h6><span style="font-style:italic; ">Datensatz-ID:</span>1</h6><br/> >> <table border="1" width="100%"><tbody> >> <tr><td align="center" colspan="2"><h1><span style="font-style:italic; >> ">Alte Signatur:</span>asd</h1></td></tr> >> <tr><td colspan="2"/></tr><tr><td align="center" >> colspan="2"><h2>Mittelalterl. Bibliothekskatalog (MBK)</h2></td></tr> >> <tr><td colspan="2"><table border="1" width="100%"><tbody> >> <tr><td width="200"><h4>Text</h4></td><td><h4> >> >> <xforms:output mediatype="text/html"> >> <span class="xml-match">Test</span><strong><span >> class="xml-match">Test</span></strong> <em><span >> class="xml-match">Test</span><br /></em><div align="center"><span >> class="xml-match">Test</span><br /><div >> align="left">x<sub>2<sup>4</sup></sub><sup>3</sup> y<sup>3</sup><br >> /><ul><li>1</li><li>2</li><li>3</li></ul><font color="#ff0000">Rot<br >> /></font></div></div> >> </xforms:output> >> >> </h4></td></tr> >> <tr><td width="200"><h4>textkrit. Apparat (MBK >> III/3)</h4></td><td><h4/></td></tr> >> <tr><td width="200"><h4>Stellennachweis (MBK >> III/3)</h4></td><td><h4/></td></tr> >> <tr><td height="22" width="200"><h4>Volltext</h4></td><td >> height="22"><h4/></td></tr> >> </tbody></table></td></tr> >> >> ... <!-- left a lot of other fields out to save space! --> >> >> </td></tr></table> >> >> >> 7. My blank.xhtml: >> >> <html xmlns:xs="http://www.w3.org/2001/XMLSchema" >> xmlns:xforms="http://www.w3.org/2002/xforms" >> xmlns:ev="http://www.w3.org/2001/xml-events" >> xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" >> xmlns:f="http://orbeon.org/oxf/xml/formatting" >> xmlns:xhtml="http://www.w3.org/1999/xhtml" >> xmlns:xi="http://www.w3.org/2001/XInclude" >> xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" >> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >> xmlns="http://www.w3.org/1999/xhtml" >> xmlns:exist="http://exist.sourceforge.net/NS/exist" >> xsl:version="2.0"> >> <head> >> <link rel="stylesheet" type="text/css" >> href="/apps/forms/style.css"/> >> <!-- Main XForms model --> >> <xforms:model id="common-model" >> xmlns:xforms="http://www.w3.org/2002/xforms"> >> <xforms:action ev:event="xforms-ready"> >> </xforms:action> >> <!-- Instance containing the page parameters --> >> <xforms:instance id="parameters-instance"> >> <xi:include href="input:instance" >> xxi:omit-xml-base="true"/> >> </xforms:instance> >> >> <xforms:instance id="result-instance"> >> <xi:include href="input:data"/> >> </xforms:instance> >> >> </xforms:model> >> <!-- Model to handle persistence --> >> <xi:include href="oxf:/apps/search/common/persistence-model.xml" >> xxi:omit-xml-base="true"/> >> <!-- Model to handle resources --> >> <xi:include href="oxf:/apps/search/common/resources-model.xml" >> xxi:omit-xml-base="true"/> >> >> <title>Result</title> >> </head> >> <body> >> <xhtml:p> >> <xforms:output >> value="xxforms:serialize(instance('result-instance'),'html')" >> mediatype="text/html" /> >> </xhtml:p><hr/> >> <xhtml:p> >> <xforms:output >> value="xxforms:serialize(instance('result-instance'),'text')" >> mediatype="text/html" /> >> </xhtml:p><hr/> >> <widget:xforms-instance-inspector >> xmlns:widget="http://orbeon.org/oxf/xml/widget"/> >> </body> >> </html> >> >> --> <xforms:output >> value="xxforms:serialize(instance('result-instance'),'html')" >> mediatype="text/html" /> >> This line display the right layout on my new page, all fields, all data, >> except the embedded html :( >> Looking to the source code, everything from the instance was inserted, >> except the <xforms:output media-type="text/html">-Tag - also the content >> of this field, but any more surrounded by the xforms:output, that should >> give me the right display of the embedded html as you said :-( >> >> --> <xforms:output >> value="xxforms:serialize(instance('result-instance'),'text')" >> mediatype="text/html" /> >> This line display all the content, but without any table structure or >> any other layouts. Except the embedded-html - that content is now >> displayed correct, but in this case useless, because the hole page has >> no ,ayout anymore :-( >> >> >> And both option do NOT leave the xforms-control intact, but wipe them >> away - so my transforming and including of all xform-controls is useless >> unless i don't get them into my new page so that the will work :-(( But >> i need those xform-controls for displaying the embedded html-tags as you >> said, and also for the triggers, to link some of the data to other >> documents, that should be loaded when clicking on those links :-( >> Because of that i asked about the submissions through javascript, cause >> i think <a>-tags will work so far. Of course i would prefer >> <xform-trigger> now, after you gave me more information on that, but for >> that, i need those xform-controls to work that where insert by my >> stylesheet through the xslt-process. >> >> I hope that makes my problem more clear, i don't know what i else can >> do, i'm lost. >> The aim seems to be so near, while all i need is inside that >> result-instance you see - but i could not get it INTO my blank.xhtml so >> that the xform-control will work. >> >> In my opinion this seems to be straight forward how something like that >> should work, doesn't it? >> Query, Transform, Adding XForm-control, Put it into a new page, and >> tadaaa - A result-page showing exactly the searched data in a good >> layout with many links on it to get more details information through >> linked documents... >> Am i stupid to think it could and should be that easy? :-(( Than forgive >> me for causing you so much problems :-( >> >> Thanks for every help you gave me, >> Marcus >> >> >> > > > -- > Orbeon Forms - Web Forms for the Enterprise Done the Right Way > http://www.orbeon.com/ > > -------------------------------------------------------------------------------- > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws marcus.zip (15K) Download Attachment |
Hi,
me one more time. I thought also about the problem and may it be possible to add xfroms-to-xhtml transformation during the Pipeline too? After getting the data from the exist-db and transforming it with html-formats and adding xform-control may this be possible? I tried to add the theme-widgets with an processor and that worked, but finally the last step is missing - transforming the page through the xforms processor to get a basic html-page with working forms. Is that possible? I tried to understand the xforms-epilogue.xpl and add further steps to my pipeline, but also this i couldn't get to make it work :-(( Just another "newby" idea of solving that problem. Could this become a working solution? Thanks, Macus ----- Original Message ----- From: "Marcus" <[hidden email]> To: <[hidden email]> Sent: Thursday, May 17, 2007 11:26 PM Subject: Re: [ops-users] Display HTML-Tags right? > Hi Erik, > finally i had time to build that extra test-app and i hope that will help > to > find a solution! > Just unzip to RESOURCES/apps/ All files are in the subdir "marcus" Just > add > this to your main pfc and i hope it works! > Thanks a lot for your help!!! > > Regards, Marcus > > > > ----- Original Message ----- > From: "Erik Bruchez" <[hidden email]> > To: <[hidden email]> > Sent: Thursday, May 17, 2007 6:19 PM > Subject: Re: [ops-users] Display HTML-Tags right? > > >> Marcus, >> >> It's nice that you are sending all these details, but going through them >> and understanding them in the abstract really takes a lot of time. >> >> What would be better would be to attach a zip of a very simple >> application which we can simply unzip under RESOURCES/apps/ and run to >> see the problem and attempt to find a solution. >> >> If you do this, don't even include the eXist layer: run your app, >> extract the output of the eXist layer, and save it as a static file. You >> get the idea: make it as easy as possible for somebody to run the code >> and find a solution. Hopefully this is only a page flow with one entry, >> a static file containing the result from eXist, an XPL file and/or XSLT >> and/or XForms document. >> >> Then somebody can do: >> >> * Unzip >> * Hit http://localhost:8080/ops/marcus >> >> And see the result. >> >> -Erik >> >> Marcus wrote: >>> Hi Erik, hi all the others tried to help so far (Florian, Ryan) >>> >>> let me say in the first place, that i appreciate it very much, that you >>> guys are trying to help me and spending your time in trying to >>> understand my confused mails and my worse english. Thank you for all you >>> do!!! But i'm still lost :-( >>> My english isn't that good, that i could probably find the right words >>> to explain the full exact situation :-(( >>> I'm very sorry for that and that this causees so much confusion :-( >>> >>> I'll try it one more time to explain where exactly my problem lies and i >>> hope that would make things a bit clearer.... >>> So please think of the following szenario: >>> >>> 1. Search.xhtml: >>> A Page in my webapp, showing all menus, the language-option and the >>> stuff i could include with the theme-widgets. >>> A singel input-field for fulltextsearch and a submit button. By entering >>> text to the field you get a hand full of suggestions from the >>> database-index starting with the enterd string. Push the button will >>> start the submission for searching. >>> >>> 2. My submission: >>> <xforms:submission id="search01" >>> ref="xxforms:instance('search01-instance')" >>> method="get" action="/search/service/search01" >>> replace="all" f:url-type="resource"/> >>> >>> 3. My page-flow: >>> <page id="search01" path-info="/search/service/search01" >>> model="search01.xpl" view="blank.xhtml" >>> default-submission="parameters.xml"> >>> <setvalue ref="/parameters/search-criteria" >>> parameter="search-criteria"/> >>> </page> >>> >>> 4. My search01.xpl: >>> <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" >>> xmlns:oxf="http://www.orbeon.com/oxf/processors" >>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >>> xmlns:xdb="http://orbeon.org/oxf/xml/xmldb"> >>> <p:param name="instance" type="input"/> >>> <p:param name="data" type="output"/> >>> <!-- Create search query for exist --> >>> <p:processor name="oxf:xslt-2.0"> >>> <p:input name="data" href="#instance"/> >>> <p:input name="config"> >>> <xdb:query xsl:version="2.0" collection="/db/kkbib/forms"> >>> xquery version "1.0"; >>> declare namespace >>> xmldb="http://exist-db.org/xquery/xmldb"; >>> import module namespace >>> t="http://exist-db.org/xquery/text"; >>> declare namespace >>> fn="http://www.w3.org/2003/05/xpath-functions"; >>> declare option exist:serialize >>> "highlight-matches=elements method=xhtml >>> media-type=application/xhtml+xml"; >>> <!-- create tokenized values --> >>> <xsl:variable name="search-criteria"> >>> <xsl:choose> >>> <xsl:when test="contains(//search-criteria,' ')"> >>> ( >>> <xsl:for-each >>> select="tokenize(//search-criteria,' ')"> >>> '<xsl:value-of select="."/>' >>> <xsl:if test="not(position() = >>> last())">,</xsl:if> >>> </xsl:for-each> >>> ) >>> </xsl:when> >>> <xsl:otherwise> >>> '<xsl:value-of select="//search-criteria"/>' >>> </xsl:otherwise> >>> </xsl:choose> >>> </xsl:variable> >>> <result> >>> <term> >>> <xsl:value-of select="$search-criteria"/> >>> </term> >>> <item>{ >>> let $hits := >>> collection('/db/kkbib/forms/SIG')//form[text:match-all(.,<xsl:value-of >>> select="$search-criteria"/>)] >>> for $hit in $hits >>> return >>> $hit >>> }</item> >>> </result> >>> </xdb:query> >>> </p:input> >>> <p:output name="data" id="search-query"/> >>> </p:processor> >>> <!-- query exist --> >>> <p:processor name="oxf:xmldb-query"> >>> <p:input name="datasource" href="datasource.xml"/> >>> <p:input name="query" href="#search-query"/> >>> <p:output name="data" id="search-result"/> >>> </p:processor> >>> <!-- Transform the results via XSLT --> >>> <p:processor name="oxf:xslt"> >>> <p:input name="config" href="layout-table.xsl"/> >>> <p:input name="data" href="#search-result"/> >>> <p:output name="data" ref="data"/> >>> </p:processor> >>> </p:config> >>> >>> >>> 5. My layout-table.xsl: >>> <?xml version="1.0" encoding="UTF-8"?> >>> <xsl:stylesheet version="2.0" >>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >>> xmlns:xs="http://www.w3.org/2001/XMLSchema" >>> xmlns:fn="http://www.w3.org/2005/xpath-functions" >>> xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" >>> xmlns:exist="http://exist.sourceforge.net/NS/exist" >>> xmlns:xforms="http://www.w3.org/2002/xforms" >>> xmlns="http://www.w3.org/1999/xhtml" >>> xmlns:xi="http://www.w3.org/2001/XInclude" >>> xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" > >>> <xsl:output version="1.0" encoding="UTF-8" indent="yes" >>> method="xhtml" media-type="text/html"/> >>> >>> <xsl:template match="exist:match"> >>> <span class="xml-match"> >>> <xsl:value-of select="."/> >>> </span> >>> </xsl:template> >>> >>> <xsl:template match="/"> >>> <table><tr><td> >>> <xsl:for-each select="result"> >>> <xsl:for-each select="term"> >>> <span style="font-style:italic; ">Suchbegriff: >>> </span> >>> <xsl:apply-templates select="."/> >>> </xsl:for-each> >>> <xsl:for-each select="item"> >>> <xsl:for-each select="form"> >>> <xsl:for-each select="Datensatz"> >>> <br /> >>> <h6> >>> <xsl:for-each select="ID"> >>> <span style="font-style:italic; >>> ">Datensatz-ID: </span> >>> <xsl:apply-templates /> >>> </xsl:for-each> >>> </h6> >>> <xsl:for-each select="ASig"> >>> <br /> >>> <table border="1" width="100%"> >>> <tbody> >>> <tr> >>> <td align="center" colspan="2"> >>> <h1> >>> <span >>> style="font-style:italic; ">Alte Signatur: </span> >>> <xsl:for-each >>> select="ASTitel"> >>> <xsl:apply-templates >>> /> >>> </xsl:for-each> >>> </h1> >>> </td> >>> </tr> >>> <tr> >>> <td colspan="2" /> >>> </tr> >>> <tr> >>> <td align="center" colspan="2"> >>> <h2>Mittelalterl. >>> Bibliothekskatalog (MBK)</h2> >>> </td> >>> </tr> >>> <tr> >>> <td colspan="2"> >>> <xsl:for-each select="MBK"> >>> <xsl:for-each >>> select="KatEintrag"> >>> <table border="1" >>> width="100%"> >>> <tbody> >>> <tr> >>> <td >>> width="200"> >>> >>> <h4>Text</h4> >>> </td> >>> <td> >>> <h4> >>> >>> <xsl:for-each select="Inhalt"> >>> >>> <!-- Here i try to put the xforms:output around the content which >>> includes the embedded html! --> >>> >>> <xforms:output mediatype="text/html"> >>> >>> <xsl:apply-templates /> >>> >>> </xforms:output> >>> >>> >>> </xsl:for-each> >>> </h4> >>> </td> >>> </tr> >>> <tr> >>> <td >>> width="200"> >>> >>> <h4>textkrit. Apparat (MBK III/3)</h4> >>> </td> >>> <td> >>> <h4> >>> >>> <xsl:for-each select="Apparat"> >>> >>> <xsl:apply-templates /> >>> >>> </xsl:for-each> >>> </h4> >>> </td> >>> </tr> >>> </tbody> >>> </table> >>> </xsl:for-each> >>> </xsl:for-each> >>> </td> >>> </tr> >>> >>> ... <!-- left a lot of other fields out to save space! --> >>> >>> <tr> >>> <td align="center" colspan="2"> >>> <h2>Bemerkungen</h2> >>> </td> >>> </tr> >>> <tr> >>> <td colspan="2"> >>> <xsl:for-each >>> select="Bemerkungen"> >>> <xsl:apply-templates /> >>> </xsl:for-each> >>> </td> >>> </tr> >>> </tbody> >>> </table> >>> </xsl:for-each> >>> <br /> >>> >>> ... <!-- left a lot of other fields out to save space! --> >>> >>> </xsl:for-each> >>> </xsl:for-each> >>> </xsl:for-each> >>> </xsl:for-each> >>> </td></tr></table> >>> </xsl:template> >>> </xsl:stylesheet> >>> >>> >>> 6. The result of the XPL that i could add to the resulst-instance on my >>> blank.xhtml.(copied from the instance inspector) >>> --> :result-instance() >>> >>> <table xml:base="input:data" >>> xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" >>> xmlns:exist="http://exist.sourceforge.net/NS/exist" >>> xmlns="http://www.w3.org/1999/xhtml" >>> xmlns:xs="http://www.w3.org/2001/XMLSchema" >>> xmlns:xforms="http://www.w3.org/2002/xforms" >>> xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" >>> xmlns:ev="http://www.w3.org/2001/xml-events" >>> xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" >>> xmlns:xi="http://www.w3.org/2001/XInclude" >>> xmlns:fn="http://www.w3.org/2005/xpath-functions" >>> xmlns:f="http://orbeon.org/oxf/xml/formatting" >>> xmlns:xhtml="http://www.w3.org/1999/xhtml"> >>> <tr><td> >>> >>> <span style="font-style:italic; ">Suchbegriff:</span>'test'<br/> >>> <h6><span style="font-style:italic; ">Datensatz-ID:</span>1</h6><br/> >>> <table border="1" width="100%"><tbody> >>> <tr><td align="center" colspan="2"><h1><span style="font-style:italic; >>> ">Alte Signatur:</span>asd</h1></td></tr> >>> <tr><td colspan="2"/></tr><tr><td align="center" >>> colspan="2"><h2>Mittelalterl. Bibliothekskatalog (MBK)</h2></td></tr> >>> <tr><td colspan="2"><table border="1" width="100%"><tbody> >>> <tr><td width="200"><h4>Text</h4></td><td><h4> >>> >>> <xforms:output mediatype="text/html"> >>> <span class="xml-match">Test</span><strong><span >>> class="xml-match">Test</span></strong> <em><span >>> class="xml-match">Test</span><br /></em><div align="center"><span >>> class="xml-match">Test</span><br /><div >>> align="left">x<sub>2<sup>4</sup></sub><sup>3</sup> y<sup>3</sup><br >>> /><ul><li>1</li><li>2</li><li>3</li></ul><font color="#ff0000">Rot<br >>> /></font></div></div> >>> </xforms:output> >>> >>> </h4></td></tr> >>> <tr><td width="200"><h4>textkrit. Apparat (MBK >>> III/3)</h4></td><td><h4/></td></tr> >>> <tr><td width="200"><h4>Stellennachweis (MBK >>> III/3)</h4></td><td><h4/></td></tr> >>> <tr><td height="22" width="200"><h4>Volltext</h4></td><td >>> height="22"><h4/></td></tr> >>> </tbody></table></td></tr> >>> >>> ... <!-- left a lot of other fields out to save space! --> >>> >>> </td></tr></table> >>> >>> >>> 7. My blank.xhtml: >>> >>> <html xmlns:xs="http://www.w3.org/2001/XMLSchema" >>> xmlns:xforms="http://www.w3.org/2002/xforms" >>> xmlns:ev="http://www.w3.org/2001/xml-events" >>> xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" >>> xmlns:f="http://orbeon.org/oxf/xml/formatting" >>> xmlns:xhtml="http://www.w3.org/1999/xhtml" >>> xmlns:xi="http://www.w3.org/2001/XInclude" >>> xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" >>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >>> xmlns="http://www.w3.org/1999/xhtml" >>> xmlns:exist="http://exist.sourceforge.net/NS/exist" >>> xsl:version="2.0"> >>> <head> >>> <link rel="stylesheet" type="text/css" >>> href="/apps/forms/style.css"/> >>> <!-- Main XForms model --> >>> <xforms:model id="common-model" >>> xmlns:xforms="http://www.w3.org/2002/xforms"> >>> <xforms:action ev:event="xforms-ready"> >>> </xforms:action> >>> <!-- Instance containing the page parameters --> >>> <xforms:instance id="parameters-instance"> >>> <xi:include href="input:instance" >>> xxi:omit-xml-base="true"/> >>> </xforms:instance> >>> >>> <xforms:instance id="result-instance"> >>> <xi:include href="input:data"/> >>> </xforms:instance> >>> >>> </xforms:model> >>> <!-- Model to handle persistence --> >>> <xi:include href="oxf:/apps/search/common/persistence-model.xml" >>> xxi:omit-xml-base="true"/> >>> <!-- Model to handle resources --> >>> <xi:include href="oxf:/apps/search/common/resources-model.xml" >>> xxi:omit-xml-base="true"/> >>> >>> <title>Result</title> >>> </head> >>> <body> >>> <xhtml:p> >>> <xforms:output >>> value="xxforms:serialize(instance('result-instance'),'html')" >>> mediatype="text/html" /> >>> </xhtml:p><hr/> >>> <xhtml:p> >>> <xforms:output >>> value="xxforms:serialize(instance('result-instance'),'text')" >>> mediatype="text/html" /> >>> </xhtml:p><hr/> >>> <widget:xforms-instance-inspector >>> xmlns:widget="http://orbeon.org/oxf/xml/widget"/> >>> </body> >>> </html> >>> >>> --> <xforms:output >>> value="xxforms:serialize(instance('result-instance'),'html')" >>> mediatype="text/html" /> >>> This line display the right layout on my new page, all fields, all data, >>> except the embedded html :( >>> Looking to the source code, everything from the instance was inserted, >>> except the <xforms:output media-type="text/html">-Tag - also the content >>> of this field, but any more surrounded by the xforms:output, that should >>> give me the right display of the embedded html as you said :-( >>> >>> --> <xforms:output >>> value="xxforms:serialize(instance('result-instance'),'text')" >>> mediatype="text/html" /> >>> This line display all the content, but without any table structure or >>> any other layouts. Except the embedded-html - that content is now >>> displayed correct, but in this case useless, because the hole page has >>> no ,ayout anymore :-( >>> >>> >>> And both option do NOT leave the xforms-control intact, but wipe them >>> away - so my transforming and including of all xform-controls is useless >>> unless i don't get them into my new page so that the will work :-(( But >>> i need those xform-controls for displaying the embedded html-tags as you >>> said, and also for the triggers, to link some of the data to other >>> documents, that should be loaded when clicking on those links :-( >>> Because of that i asked about the submissions through javascript, cause >>> i think <a>-tags will work so far. Of course i would prefer >>> <xform-trigger> now, after you gave me more information on that, but for >>> that, i need those xform-controls to work that where insert by my >>> stylesheet through the xslt-process. >>> >>> I hope that makes my problem more clear, i don't know what i else can >>> do, i'm lost. >>> The aim seems to be so near, while all i need is inside that >>> result-instance you see - but i could not get it INTO my blank.xhtml so >>> that the xform-control will work. >>> >>> In my opinion this seems to be straight forward how something like that >>> should work, doesn't it? >>> Query, Transform, Adding XForm-control, Put it into a new page, and >>> tadaaa - A result-page showing exactly the searched data in a good >>> layout with many links on it to get more details information through >>> linked documents... >>> Am i stupid to think it could and should be that easy? :-(( Than forgive >>> me for causing you so much problems :-( >>> >>> Thanks for every help you gave me, >>> Marcus >>> >>> >>> >> >> >> -- >> Orbeon Forms - Web Forms for the Enterprise Done the Right Way >> http://www.orbeon.com/ >> >> > > > -------------------------------------------------------------------------------- > > >> >> -- >> You receive this message as a subscriber of the [hidden email] >> mailing list. >> To unsubscribe: mailto:[hidden email] >> For general help: mailto:[hidden email]?subject=help >> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws >> > -------------------------------------------------------------------------------- > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
In reply to this post by Marcus-2
Hi Marcus,
I had a quick look at it. First, the content of <Inhalt> is: <exist:match xmlns:exist="http://exist.sourceforge.net/NS/exist">Test</exist:match> <strong><exist:match xmlns:exist="http://exist.sourceforge.net/NS/exist">Test</exist:match></strong> <em><exist:match xmlns:exist="http://exist.sourceforge.net/NS/exist">Test</exist:match><br /></em><div align="center"><exist:match xmlns:exist="http://exist.sourceforge.net/NS/exist">Test</exist:match><br /><div align="left">x<sub>2<sup>4</sup></sub><sup>3</sup> y<sup>3</sup><br /><ul><li>1</li><li>2</li><li>3</li></ul><font color="#ff0000">Rot<br /></font></div></div> I assume that this is where you have trouble. But first, I need to understand what you want to do with the above, in particular with all the <exist:match> elements. -Erik Marcus wrote: > Hi Erik, > finally i had time to build that extra test-app and i hope that will > help to find a solution! > Just unzip to RESOURCES/apps/ All files are in the subdir "marcus" Just > add this to your main pfc and i hope it works! > Thanks a lot for your help!!! > > Regards, Marcus > > > > ----- Original Message ----- From: "Erik Bruchez" <[hidden email]> > To: <[hidden email]> > Sent: Thursday, May 17, 2007 6:19 PM > Subject: Re: [ops-users] Display HTML-Tags right? > > >> Marcus, >> >> It's nice that you are sending all these details, but going through them >> and understanding them in the abstract really takes a lot of time. >> >> What would be better would be to attach a zip of a very simple >> application which we can simply unzip under RESOURCES/apps/ and run to >> see the problem and attempt to find a solution. >> >> If you do this, don't even include the eXist layer: run your app, >> extract the output of the eXist layer, and save it as a static file. You >> get the idea: make it as easy as possible for somebody to run the code >> and find a solution. Hopefully this is only a page flow with one entry, >> a static file containing the result from eXist, an XPL file and/or XSLT >> and/or XForms document. >> >> Then somebody can do: >> >> * Unzip >> * Hit http://localhost:8080/ops/marcus >> >> And see the result. >> >> -Erik >> >> Marcus wrote: >>> Hi Erik, hi all the others tried to help so far (Florian, Ryan) >>> >>> let me say in the first place, that i appreciate it very much, that you >>> guys are trying to help me and spending your time in trying to >>> understand my confused mails and my worse english. Thank you for all you >>> do!!! But i'm still lost :-( >>> My english isn't that good, that i could probably find the right words >>> to explain the full exact situation :-(( >>> I'm very sorry for that and that this causees so much confusion :-( >>> >>> I'll try it one more time to explain where exactly my problem lies and i >>> hope that would make things a bit clearer.... >>> So please think of the following szenario: >>> >>> 1. Search.xhtml: >>> A Page in my webapp, showing all menus, the language-option and the >>> stuff i could include with the theme-widgets. >>> A singel input-field for fulltextsearch and a submit button. By entering >>> text to the field you get a hand full of suggestions from the >>> database-index starting with the enterd string. Push the button will >>> start the submission for searching. >>> >>> 2. My submission: >>> <xforms:submission id="search01" >>> ref="xxforms:instance('search01-instance')" >>> method="get" action="/search/service/search01" >>> replace="all" f:url-type="resource"/> >>> >>> 3. My page-flow: >>> <page id="search01" path-info="/search/service/search01" >>> model="search01.xpl" view="blank.xhtml" >>> default-submission="parameters.xml"> >>> <setvalue ref="/parameters/search-criteria" >>> parameter="search-criteria"/> >>> </page> >>> >>> 4. My search01.xpl: >>> <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" >>> xmlns:oxf="http://www.orbeon.com/oxf/processors" >>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >>> xmlns:xdb="http://orbeon.org/oxf/xml/xmldb"> >>> <p:param name="instance" type="input"/> >>> <p:param name="data" type="output"/> >>> <!-- Create search query for exist --> >>> <p:processor name="oxf:xslt-2.0"> >>> <p:input name="data" href="#instance"/> >>> <p:input name="config"> >>> <xdb:query xsl:version="2.0" collection="/db/kkbib/forms"> >>> xquery version "1.0"; >>> declare namespace >>> xmldb="http://exist-db.org/xquery/xmldb"; >>> import module namespace >>> t="http://exist-db.org/xquery/text"; >>> declare namespace >>> fn="http://www.w3.org/2003/05/xpath-functions"; >>> declare option exist:serialize >>> "highlight-matches=elements method=xhtml >>> media-type=application/xhtml+xml"; >>> <!-- create tokenized values --> >>> <xsl:variable name="search-criteria"> >>> <xsl:choose> >>> <xsl:when test="contains(//search-criteria,' ')"> >>> ( >>> <xsl:for-each >>> select="tokenize(//search-criteria,' ')"> >>> '<xsl:value-of select="."/>' >>> <xsl:if test="not(position() = >>> last())">,</xsl:if> >>> </xsl:for-each> >>> ) >>> </xsl:when> >>> <xsl:otherwise> >>> '<xsl:value-of select="//search-criteria"/>' >>> </xsl:otherwise> >>> </xsl:choose> >>> </xsl:variable> >>> <result> >>> <term> >>> <xsl:value-of select="$search-criteria"/> >>> </term> >>> <item>{ >>> let $hits := >>> collection('/db/kkbib/forms/SIG')//form[text:match-all(.,<xsl:value-of >>> select="$search-criteria"/>)] >>> for $hit in $hits >>> return >>> $hit >>> }</item> >>> </result> >>> </xdb:query> >>> </p:input> >>> <p:output name="data" id="search-query"/> >>> </p:processor> >>> <!-- query exist --> >>> <p:processor name="oxf:xmldb-query"> >>> <p:input name="datasource" href="datasource.xml"/> >>> <p:input name="query" href="#search-query"/> >>> <p:output name="data" id="search-result"/> >>> </p:processor> >>> <!-- Transform the results via XSLT --> >>> <p:processor name="oxf:xslt"> >>> <p:input name="config" href="layout-table.xsl"/> >>> <p:input name="data" href="#search-result"/> >>> <p:output name="data" ref="data"/> >>> </p:processor> >>> </p:config> >>> >>> >>> 5. My layout-table.xsl: >>> <?xml version="1.0" encoding="UTF-8"?> >>> <xsl:stylesheet version="2.0" >>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >>> xmlns:xs="http://www.w3.org/2001/XMLSchema" >>> xmlns:fn="http://www.w3.org/2005/xpath-functions" >>> xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" >>> xmlns:exist="http://exist.sourceforge.net/NS/exist" >>> xmlns:xforms="http://www.w3.org/2002/xforms" >>> xmlns="http://www.w3.org/1999/xhtml" >>> xmlns:xi="http://www.w3.org/2001/XInclude" >>> xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" > >>> <xsl:output version="1.0" encoding="UTF-8" indent="yes" >>> method="xhtml" media-type="text/html"/> >>> >>> <xsl:template match="exist:match"> >>> <span class="xml-match"> >>> <xsl:value-of select="."/> >>> </span> >>> </xsl:template> >>> >>> <xsl:template match="/"> >>> <table><tr><td> >>> <xsl:for-each select="result"> >>> <xsl:for-each select="term"> >>> <span style="font-style:italic; ">Suchbegriff: >>> </span> >>> <xsl:apply-templates select="."/> >>> </xsl:for-each> >>> <xsl:for-each select="item"> >>> <xsl:for-each select="form"> >>> <xsl:for-each select="Datensatz"> >>> <br /> >>> <h6> >>> <xsl:for-each select="ID"> >>> <span style="font-style:italic; >>> ">Datensatz-ID: </span> >>> <xsl:apply-templates /> >>> </xsl:for-each> >>> </h6> >>> <xsl:for-each select="ASig"> >>> <br /> >>> <table border="1" width="100%"> >>> <tbody> >>> <tr> >>> <td align="center" colspan="2"> >>> <h1> >>> <span >>> style="font-style:italic; ">Alte Signatur: </span> >>> <xsl:for-each >>> select="ASTitel"> >>> >>> <xsl:apply-templates /> >>> </xsl:for-each> >>> </h1> >>> </td> >>> </tr> >>> <tr> >>> <td colspan="2" /> >>> </tr> >>> <tr> >>> <td align="center" colspan="2"> >>> <h2>Mittelalterl. >>> Bibliothekskatalog (MBK)</h2> >>> </td> >>> </tr> >>> <tr> >>> <td colspan="2"> >>> <xsl:for-each select="MBK"> >>> <xsl:for-each >>> select="KatEintrag"> >>> <table border="1" >>> width="100%"> >>> <tbody> >>> <tr> >>> <td >>> width="200"> >>> >>> <h4>Text</h4> >>> </td> >>> <td> >>> <h4> >>> >>> <xsl:for-each select="Inhalt"> >>> >>> <!-- Here i try to put the xforms:output around the content which >>> includes the embedded html! --> >>> >>> <xforms:output mediatype="text/html"> >>> >>> <xsl:apply-templates /> >>> >>> </xforms:output> >>> >>> >>> </xsl:for-each> >>> </h4> >>> </td> >>> </tr> >>> <tr> >>> <td >>> width="200"> >>> >>> <h4>textkrit. Apparat (MBK III/3)</h4> >>> </td> >>> <td> >>> <h4> >>> >>> <xsl:for-each select="Apparat"> >>> >>> <xsl:apply-templates /> >>> >>> </xsl:for-each> >>> </h4> >>> </td> >>> </tr> >>> </tbody> >>> </table> >>> </xsl:for-each> >>> </xsl:for-each> >>> </td> >>> </tr> >>> >>> ... <!-- left a lot of other fields out to save space! --> >>> >>> <tr> >>> <td align="center" colspan="2"> >>> <h2>Bemerkungen</h2> >>> </td> >>> </tr> >>> <tr> >>> <td colspan="2"> >>> <xsl:for-each >>> select="Bemerkungen"> >>> <xsl:apply-templates /> >>> </xsl:for-each> >>> </td> >>> </tr> >>> </tbody> >>> </table> >>> </xsl:for-each> >>> <br /> >>> >>> ... <!-- left a lot of other fields out to save space! --> >>> >>> </xsl:for-each> >>> </xsl:for-each> >>> </xsl:for-each> >>> </xsl:for-each> >>> </td></tr></table> >>> </xsl:template> >>> </xsl:stylesheet> >>> >>> >>> 6. The result of the XPL that i could add to the resulst-instance on my >>> blank.xhtml.(copied from the instance inspector) >>> --> :result-instance() >>> >>> <table xml:base="input:data" >>> xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" >>> xmlns:exist="http://exist.sourceforge.net/NS/exist" >>> xmlns="http://www.w3.org/1999/xhtml" >>> xmlns:xs="http://www.w3.org/2001/XMLSchema" >>> xmlns:xforms="http://www.w3.org/2002/xforms" >>> xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" >>> xmlns:ev="http://www.w3.org/2001/xml-events" >>> xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" >>> xmlns:xi="http://www.w3.org/2001/XInclude" >>> xmlns:fn="http://www.w3.org/2005/xpath-functions" >>> xmlns:f="http://orbeon.org/oxf/xml/formatting" >>> xmlns:xhtml="http://www.w3.org/1999/xhtml"> >>> <tr><td> >>> >>> <span style="font-style:italic; ">Suchbegriff:</span>'test'<br/> >>> <h6><span style="font-style:italic; ">Datensatz-ID:</span>1</h6><br/> >>> <table border="1" width="100%"><tbody> >>> <tr><td align="center" colspan="2"><h1><span style="font-style:italic; >>> ">Alte Signatur:</span>asd</h1></td></tr> >>> <tr><td colspan="2"/></tr><tr><td align="center" >>> colspan="2"><h2>Mittelalterl. Bibliothekskatalog (MBK)</h2></td></tr> >>> <tr><td colspan="2"><table border="1" width="100%"><tbody> >>> <tr><td width="200"><h4>Text</h4></td><td><h4> >>> >>> <xforms:output mediatype="text/html"> >>> <span class="xml-match">Test</span><strong><span >>> class="xml-match">Test</span></strong> <em><span >>> class="xml-match">Test</span><br /></em><div align="center"><span >>> class="xml-match">Test</span><br /><div >>> align="left">x<sub>2<sup>4</sup></sub><sup>3</sup> y<sup>3</sup><br >>> /><ul><li>1</li><li>2</li><li>3</li></ul><font color="#ff0000">Rot<br >>> /></font></div></div> >>> </xforms:output> >>> >>> </h4></td></tr> >>> <tr><td width="200"><h4>textkrit. Apparat (MBK >>> III/3)</h4></td><td><h4/></td></tr> >>> <tr><td width="200"><h4>Stellennachweis (MBK >>> III/3)</h4></td><td><h4/></td></tr> >>> <tr><td height="22" width="200"><h4>Volltext</h4></td><td >>> height="22"><h4/></td></tr> >>> </tbody></table></td></tr> >>> >>> ... <!-- left a lot of other fields out to save space! --> >>> >>> </td></tr></table> >>> >>> >>> 7. My blank.xhtml: >>> >>> <html xmlns:xs="http://www.w3.org/2001/XMLSchema" >>> xmlns:xforms="http://www.w3.org/2002/xforms" >>> xmlns:ev="http://www.w3.org/2001/xml-events" >>> xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" >>> xmlns:f="http://orbeon.org/oxf/xml/formatting" >>> xmlns:xhtml="http://www.w3.org/1999/xhtml" >>> xmlns:xi="http://www.w3.org/2001/XInclude" >>> xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" >>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >>> xmlns="http://www.w3.org/1999/xhtml" >>> xmlns:exist="http://exist.sourceforge.net/NS/exist" xsl:version="2.0"> >>> <head> >>> <link rel="stylesheet" type="text/css" >>> href="/apps/forms/style.css"/> >>> <!-- Main XForms model --> >>> <xforms:model id="common-model" >>> xmlns:xforms="http://www.w3.org/2002/xforms"> >>> <xforms:action ev:event="xforms-ready"> >>> </xforms:action> >>> <!-- Instance containing the page parameters --> >>> <xforms:instance id="parameters-instance"> >>> <xi:include href="input:instance" >>> xxi:omit-xml-base="true"/> >>> </xforms:instance> >>> >>> <xforms:instance id="result-instance"> >>> <xi:include href="input:data"/> >>> </xforms:instance> >>> >>> </xforms:model> >>> <!-- Model to handle persistence --> >>> <xi:include href="oxf:/apps/search/common/persistence-model.xml" >>> xxi:omit-xml-base="true"/> >>> <!-- Model to handle resources --> >>> <xi:include href="oxf:/apps/search/common/resources-model.xml" >>> xxi:omit-xml-base="true"/> >>> >>> <title>Result</title> >>> </head> >>> <body> >>> <xhtml:p> >>> <xforms:output >>> value="xxforms:serialize(instance('result-instance'),'html')" >>> mediatype="text/html" /> >>> </xhtml:p><hr/> >>> <xhtml:p> >>> <xforms:output >>> value="xxforms:serialize(instance('result-instance'),'text')" >>> mediatype="text/html" /> >>> </xhtml:p><hr/> >>> <widget:xforms-instance-inspector >>> xmlns:widget="http://orbeon.org/oxf/xml/widget"/> >>> </body> >>> </html> >>> >>> --> <xforms:output >>> value="xxforms:serialize(instance('result-instance'),'html')" >>> mediatype="text/html" /> >>> This line display the right layout on my new page, all fields, all data, >>> except the embedded html :( >>> Looking to the source code, everything from the instance was inserted, >>> except the <xforms:output media-type="text/html">-Tag - also the content >>> of this field, but any more surrounded by the xforms:output, that should >>> give me the right display of the embedded html as you said :-( >>> >>> --> <xforms:output >>> value="xxforms:serialize(instance('result-instance'),'text')" >>> mediatype="text/html" /> >>> This line display all the content, but without any table structure or >>> any other layouts. Except the embedded-html - that content is now >>> displayed correct, but in this case useless, because the hole page has >>> no ,ayout anymore :-( >>> >>> >>> And both option do NOT leave the xforms-control intact, but wipe them >>> away - so my transforming and including of all xform-controls is useless >>> unless i don't get them into my new page so that the will work :-(( But >>> i need those xform-controls for displaying the embedded html-tags as you >>> said, and also for the triggers, to link some of the data to other >>> documents, that should be loaded when clicking on those links :-( >>> Because of that i asked about the submissions through javascript, cause >>> i think <a>-tags will work so far. Of course i would prefer >>> <xform-trigger> now, after you gave me more information on that, but for >>> that, i need those xform-controls to work that where insert by my >>> stylesheet through the xslt-process. >>> >>> I hope that makes my problem more clear, i don't know what i else can >>> do, i'm lost. >>> The aim seems to be so near, while all i need is inside that >>> result-instance you see - but i could not get it INTO my blank.xhtml so >>> that the xform-control will work. >>> >>> In my opinion this seems to be straight forward how something like that >>> should work, doesn't it? >>> Query, Transform, Adding XForm-control, Put it into a new page, and >>> tadaaa - A result-page showing exactly the searched data in a good >>> layout with many links on it to get more details information through >>> linked documents... >>> Am i stupid to think it could and should be that easy? :-(( Than forgive >>> me for causing you so much problems :-( >>> >>> Thanks for every help you gave me, >>> Marcus >>> >>> >>> >> >> >> -- >> Orbeon Forms - Web Forms for the Enterprise Done the Right Way >> http://www.orbeon.com/ >> >> > > > -------------------------------------------------------------------------------- > > > >> >> -- >> You receive this message as a subscriber of the >> [hidden email] mailing list. >> To unsubscribe: mailto:[hidden email] >> For general help: mailto:[hidden email]?subject=help >> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws >> -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Hi Erik,
so, thanks for your reply. Ok, i try it in short words to explain. First of all, besides the <exist:match>-tags, this is the data stored in the xml-file and that was entered with the wysiwyg-editor. The <exist:match>-tags came from exist by setting and mark the searched terms and the places where they were found inside my document! For testing purpose i just replace them with a simple <span>-tag at the moment within my xslt. Later, when this will work, i wanted to replace them instead of a <span> with an <a href="#"> -tag as a text-anker, so i can highlight and scroll the new page just to the place where the searchterm is found in my data. The user should see the marked term in the middle of his screen inside the whole document! So he can easyly notice, why i got this doc as result! Does that make sence to you? Hope that helps!? Thanks, Marcus ----- Original Message ----- From: "Erik Bruchez" <[hidden email]> To: <[hidden email]> Sent: Wednesday, May 23, 2007 5:16 PM Subject: Re: [ops-users] Display HTML-Tags right? > Hi Marcus, > > I had a quick look at it. First, the content of <Inhalt> is: > > <exist:match > xmlns:exist="http://exist.sourceforge.net/NS/exist">Test</exist:match> > <strong><exist:match > xmlns:exist="http://exist.sourceforge.net/NS/exist">Test</exist:match></strong> > <em><exist:match > xmlns:exist="http://exist.sourceforge.net/NS/exist">Test</exist:match><br > /></em><div align="center"><exist:match > xmlns:exist="http://exist.sourceforge.net/NS/exist">Test</exist:match><br > /><div > align="left">x<sub>2<sup>4</sup></sub><sup>3</sup> > y<sup>3</sup><br > /><ul><li>1</li><li>2</li><li>3</li></ul><font > color="#ff0000">Rot<br /></font></div></div> > > I assume that this is where you have trouble. But first, I need to > understand what you want to do with the above, in particular with all > the <exist:match> elements. > > -Erik > > Marcus wrote: >> Hi Erik, >> finally i had time to build that extra test-app and i hope that will >> help to find a solution! >> Just unzip to RESOURCES/apps/ All files are in the subdir "marcus" Just >> add this to your main pfc and i hope it works! >> Thanks a lot for your help!!! >> >> Regards, Marcus >> >> >> >> ----- Original Message ----- From: "Erik Bruchez" <[hidden email]> >> To: <[hidden email]> >> Sent: Thursday, May 17, 2007 6:19 PM >> Subject: Re: [ops-users] Display HTML-Tags right? >> >> >>> Marcus, >>> >>> It's nice that you are sending all these details, but going through them >>> and understanding them in the abstract really takes a lot of time. >>> >>> What would be better would be to attach a zip of a very simple >>> application which we can simply unzip under RESOURCES/apps/ and run to >>> see the problem and attempt to find a solution. >>> >>> If you do this, don't even include the eXist layer: run your app, >>> extract the output of the eXist layer, and save it as a static file. You >>> get the idea: make it as easy as possible for somebody to run the code >>> and find a solution. Hopefully this is only a page flow with one entry, >>> a static file containing the result from eXist, an XPL file and/or XSLT >>> and/or XForms document. >>> >>> Then somebody can do: >>> >>> * Unzip >>> * Hit http://localhost:8080/ops/marcus >>> >>> And see the result. >>> >>> -Erik >>> >>> Marcus wrote: >>>> Hi Erik, hi all the others tried to help so far (Florian, Ryan) >>>> >>>> let me say in the first place, that i appreciate it very much, that you >>>> guys are trying to help me and spending your time in trying to >>>> understand my confused mails and my worse english. Thank you for all >>>> you >>>> do!!! But i'm still lost :-( >>>> My english isn't that good, that i could probably find the right words >>>> to explain the full exact situation :-(( >>>> I'm very sorry for that and that this causees so much confusion :-( >>>> >>>> I'll try it one more time to explain where exactly my problem lies and >>>> i >>>> hope that would make things a bit clearer.... >>>> So please think of the following szenario: >>>> >>>> 1. Search.xhtml: >>>> A Page in my webapp, showing all menus, the language-option and the >>>> stuff i could include with the theme-widgets. >>>> A singel input-field for fulltextsearch and a submit button. By >>>> entering >>>> text to the field you get a hand full of suggestions from the >>>> database-index starting with the enterd string. Push the button will >>>> start the submission for searching. >>>> >>>> 2. My submission: >>>> <xforms:submission id="search01" >>>> ref="xxforms:instance('search01-instance')" >>>> method="get" action="/search/service/search01" >>>> replace="all" f:url-type="resource"/> >>>> >>>> 3. My page-flow: >>>> <page id="search01" path-info="/search/service/search01" >>>> model="search01.xpl" view="blank.xhtml" >>>> default-submission="parameters.xml"> >>>> <setvalue ref="/parameters/search-criteria" >>>> parameter="search-criteria"/> >>>> </page> >>>> >>>> 4. My search01.xpl: >>>> <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" >>>> xmlns:oxf="http://www.orbeon.com/oxf/processors" >>>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >>>> xmlns:xdb="http://orbeon.org/oxf/xml/xmldb"> >>>> <p:param name="instance" type="input"/> >>>> <p:param name="data" type="output"/> >>>> <!-- Create search query for exist --> >>>> <p:processor name="oxf:xslt-2.0"> >>>> <p:input name="data" href="#instance"/> >>>> <p:input name="config"> >>>> <xdb:query xsl:version="2.0" collection="/db/kkbib/forms"> >>>> xquery version "1.0"; >>>> declare namespace >>>> xmldb="http://exist-db.org/xquery/xmldb"; >>>> import module namespace >>>> t="http://exist-db.org/xquery/text"; >>>> declare namespace >>>> fn="http://www.w3.org/2003/05/xpath-functions"; >>>> declare option exist:serialize >>>> "highlight-matches=elements method=xhtml >>>> media-type=application/xhtml+xml"; >>>> <!-- create tokenized values --> >>>> <xsl:variable name="search-criteria"> >>>> <xsl:choose> >>>> <xsl:when test="contains(//search-criteria,' >>>> ')"> >>>> ( >>>> <xsl:for-each >>>> select="tokenize(//search-criteria,' ')"> >>>> '<xsl:value-of select="."/>' >>>> <xsl:if test="not(position() = >>>> last())">,</xsl:if> >>>> </xsl:for-each> >>>> ) >>>> </xsl:when> >>>> <xsl:otherwise> >>>> '<xsl:value-of select="//search-criteria"/>' >>>> </xsl:otherwise> >>>> </xsl:choose> >>>> </xsl:variable> >>>> <result> >>>> <term> >>>> <xsl:value-of select="$search-criteria"/> >>>> </term> >>>> <item>{ >>>> let $hits := >>>> collection('/db/kkbib/forms/SIG')//form[text:match-all(.,<xsl:value-of >>>> select="$search-criteria"/>)] >>>> for $hit in $hits >>>> return >>>> $hit >>>> }</item> >>>> </result> >>>> </xdb:query> >>>> </p:input> >>>> <p:output name="data" id="search-query"/> >>>> </p:processor> >>>> <!-- query exist --> >>>> <p:processor name="oxf:xmldb-query"> >>>> <p:input name="datasource" href="datasource.xml"/> >>>> <p:input name="query" href="#search-query"/> >>>> <p:output name="data" id="search-result"/> >>>> </p:processor> >>>> <!-- Transform the results via XSLT --> >>>> <p:processor name="oxf:xslt"> >>>> <p:input name="config" href="layout-table.xsl"/> >>>> <p:input name="data" href="#search-result"/> >>>> <p:output name="data" ref="data"/> >>>> </p:processor> >>>> </p:config> >>>> >>>> >>>> 5. My layout-table.xsl: >>>> <?xml version="1.0" encoding="UTF-8"?> >>>> <xsl:stylesheet version="2.0" >>>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >>>> xmlns:xs="http://www.w3.org/2001/XMLSchema" >>>> xmlns:fn="http://www.w3.org/2005/xpath-functions" >>>> xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" >>>> xmlns:exist="http://exist.sourceforge.net/NS/exist" >>>> xmlns:xforms="http://www.w3.org/2002/xforms" >>>> xmlns="http://www.w3.org/1999/xhtml" >>>> xmlns:xi="http://www.w3.org/2001/XInclude" >>>> xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" > >>>> <xsl:output version="1.0" encoding="UTF-8" indent="yes" >>>> method="xhtml" media-type="text/html"/> >>>> >>>> <xsl:template match="exist:match"> >>>> <span class="xml-match"> >>>> <xsl:value-of select="."/> >>>> </span> >>>> </xsl:template> >>>> >>>> <xsl:template match="/"> >>>> <table><tr><td> >>>> <xsl:for-each select="result"> >>>> <xsl:for-each select="term"> >>>> <span style="font-style:italic; ">Suchbegriff: >>>> </span> >>>> <xsl:apply-templates select="."/> >>>> </xsl:for-each> >>>> <xsl:for-each select="item"> >>>> <xsl:for-each select="form"> >>>> <xsl:for-each select="Datensatz"> >>>> <br /> >>>> <h6> >>>> <xsl:for-each select="ID"> >>>> <span style="font-style:italic; >>>> ">Datensatz-ID: </span> >>>> <xsl:apply-templates /> >>>> </xsl:for-each> >>>> </h6> >>>> <xsl:for-each select="ASig"> >>>> <br /> >>>> <table border="1" width="100%"> >>>> <tbody> >>>> <tr> >>>> <td align="center" colspan="2"> >>>> <h1> >>>> <span >>>> style="font-style:italic; ">Alte Signatur: </span> >>>> <xsl:for-each >>>> select="ASTitel"> >>>> >>>> <xsl:apply-templates /> >>>> </xsl:for-each> >>>> </h1> >>>> </td> >>>> </tr> >>>> <tr> >>>> <td colspan="2" /> >>>> </tr> >>>> <tr> >>>> <td align="center" colspan="2"> >>>> <h2>Mittelalterl. >>>> Bibliothekskatalog (MBK)</h2> >>>> </td> >>>> </tr> >>>> <tr> >>>> <td colspan="2"> >>>> <xsl:for-each select="MBK"> >>>> <xsl:for-each >>>> select="KatEintrag"> >>>> <table border="1" >>>> width="100%"> >>>> <tbody> >>>> <tr> >>>> <td >>>> width="200"> >>>> >>>> <h4>Text</h4> >>>> </td> >>>> <td> >>>> <h4> >>>> >>>> <xsl:for-each select="Inhalt"> >>>> >>>> <!-- Here i try to put the xforms:output around the content which >>>> includes the embedded html! --> >>>> >>>> <xforms:output mediatype="text/html"> >>>> >>>> <xsl:apply-templates /> >>>> >>>> </xforms:output> >>>> >>>> >>>> </xsl:for-each> >>>> >>>> </h4> >>>> </td> >>>> </tr> >>>> <tr> >>>> <td >>>> width="200"> >>>> >>>> <h4>textkrit. Apparat (MBK III/3)</h4> >>>> </td> >>>> <td> >>>> <h4> >>>> >>>> <xsl:for-each select="Apparat"> >>>> >>>> <xsl:apply-templates /> >>>> >>>> </xsl:for-each> >>>> >>>> </h4> >>>> </td> >>>> </tr> >>>> </tbody> >>>> </table> >>>> </xsl:for-each> >>>> </xsl:for-each> >>>> </td> >>>> </tr> >>>> >>>> ... <!-- left a lot of other fields out to save space! --> >>>> >>>> <tr> >>>> <td align="center" colspan="2"> >>>> <h2>Bemerkungen</h2> >>>> </td> >>>> </tr> >>>> <tr> >>>> <td colspan="2"> >>>> <xsl:for-each >>>> select="Bemerkungen"> >>>> <xsl:apply-templates /> >>>> </xsl:for-each> >>>> </td> >>>> </tr> >>>> </tbody> >>>> </table> >>>> </xsl:for-each> >>>> <br /> >>>> >>>> ... <!-- left a lot of other fields out to save space! --> >>>> >>>> </xsl:for-each> >>>> </xsl:for-each> >>>> </xsl:for-each> >>>> </xsl:for-each> >>>> </td></tr></table> >>>> </xsl:template> >>>> </xsl:stylesheet> >>>> >>>> >>>> 6. The result of the XPL that i could add to the resulst-instance on my >>>> blank.xhtml.(copied from the instance inspector) >>>> --> :result-instance() >>>> >>>> <table xml:base="input:data" >>>> xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" >>>> xmlns:exist="http://exist.sourceforge.net/NS/exist" >>>> xmlns="http://www.w3.org/1999/xhtml" >>>> xmlns:xs="http://www.w3.org/2001/XMLSchema" >>>> xmlns:xforms="http://www.w3.org/2002/xforms" >>>> xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" >>>> xmlns:ev="http://www.w3.org/2001/xml-events" >>>> xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" >>>> xmlns:xi="http://www.w3.org/2001/XInclude" >>>> xmlns:fn="http://www.w3.org/2005/xpath-functions" >>>> xmlns:f="http://orbeon.org/oxf/xml/formatting" >>>> xmlns:xhtml="http://www.w3.org/1999/xhtml"> >>>> <tr><td> >>>> >>>> <span style="font-style:italic; ">Suchbegriff:</span>'test'<br/> >>>> <h6><span style="font-style:italic; ">Datensatz-ID:</span>1</h6><br/> >>>> <table border="1" width="100%"><tbody> >>>> <tr><td align="center" colspan="2"><h1><span style="font-style:italic; >>>> ">Alte Signatur:</span>asd</h1></td></tr> >>>> <tr><td colspan="2"/></tr><tr><td align="center" >>>> colspan="2"><h2>Mittelalterl. Bibliothekskatalog (MBK)</h2></td></tr> >>>> <tr><td colspan="2"><table border="1" width="100%"><tbody> >>>> <tr><td width="200"><h4>Text</h4></td><td><h4> >>>> >>>> <xforms:output mediatype="text/html"> >>>> <span class="xml-match">Test</span><strong><span >>>> class="xml-match">Test</span></strong> <em><span >>>> class="xml-match">Test</span><br /></em><div align="center"><span >>>> class="xml-match">Test</span><br /><div >>>> align="left">x<sub>2<sup>4</sup></sub><sup>3</sup> y<sup>3</sup><br >>>> /><ul><li>1</li><li>2</li><li>3</li></ul><font color="#ff0000">Rot<br >>>> /></font></div></div> >>>> </xforms:output> >>>> >>>> </h4></td></tr> >>>> <tr><td width="200"><h4>textkrit. Apparat (MBK >>>> III/3)</h4></td><td><h4/></td></tr> >>>> <tr><td width="200"><h4>Stellennachweis (MBK >>>> III/3)</h4></td><td><h4/></td></tr> >>>> <tr><td height="22" width="200"><h4>Volltext</h4></td><td >>>> height="22"><h4/></td></tr> >>>> </tbody></table></td></tr> >>>> >>>> ... <!-- left a lot of other fields out to save space! --> >>>> >>>> </td></tr></table> >>>> >>>> >>>> 7. My blank.xhtml: >>>> >>>> <html xmlns:xs="http://www.w3.org/2001/XMLSchema" >>>> xmlns:xforms="http://www.w3.org/2002/xforms" >>>> xmlns:ev="http://www.w3.org/2001/xml-events" >>>> xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" >>>> xmlns:f="http://orbeon.org/oxf/xml/formatting" >>>> xmlns:xhtml="http://www.w3.org/1999/xhtml" >>>> xmlns:xi="http://www.w3.org/2001/XInclude" >>>> xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" >>>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >>>> xmlns="http://www.w3.org/1999/xhtml" >>>> xmlns:exist="http://exist.sourceforge.net/NS/exist" xsl:version="2.0"> >>>> <head> >>>> <link rel="stylesheet" type="text/css" >>>> href="/apps/forms/style.css"/> >>>> <!-- Main XForms model --> >>>> <xforms:model id="common-model" >>>> xmlns:xforms="http://www.w3.org/2002/xforms"> >>>> <xforms:action ev:event="xforms-ready"> >>>> </xforms:action> >>>> <!-- Instance containing the page parameters --> >>>> <xforms:instance id="parameters-instance"> >>>> <xi:include href="input:instance" >>>> xxi:omit-xml-base="true"/> >>>> </xforms:instance> >>>> >>>> <xforms:instance id="result-instance"> >>>> <xi:include href="input:data"/> >>>> </xforms:instance> >>>> >>>> </xforms:model> >>>> <!-- Model to handle persistence --> >>>> <xi:include href="oxf:/apps/search/common/persistence-model.xml" >>>> xxi:omit-xml-base="true"/> >>>> <!-- Model to handle resources --> >>>> <xi:include href="oxf:/apps/search/common/resources-model.xml" >>>> xxi:omit-xml-base="true"/> >>>> >>>> <title>Result</title> >>>> </head> >>>> <body> >>>> <xhtml:p> >>>> <xforms:output >>>> value="xxforms:serialize(instance('result-instance'),'html')" >>>> mediatype="text/html" /> >>>> </xhtml:p><hr/> >>>> <xhtml:p> >>>> <xforms:output >>>> value="xxforms:serialize(instance('result-instance'),'text')" >>>> mediatype="text/html" /> >>>> </xhtml:p><hr/> >>>> <widget:xforms-instance-inspector >>>> xmlns:widget="http://orbeon.org/oxf/xml/widget"/> >>>> </body> >>>> </html> >>>> >>>> --> <xforms:output >>>> value="xxforms:serialize(instance('result-instance'),'html')" >>>> mediatype="text/html" /> >>>> This line display the right layout on my new page, all fields, all >>>> data, >>>> except the embedded html :( >>>> Looking to the source code, everything from the instance was inserted, >>>> except the <xforms:output media-type="text/html">-Tag - also the >>>> content >>>> of this field, but any more surrounded by the xforms:output, that >>>> should >>>> give me the right display of the embedded html as you said :-( >>>> >>>> --> <xforms:output >>>> value="xxforms:serialize(instance('result-instance'),'text')" >>>> mediatype="text/html" /> >>>> This line display all the content, but without any table structure or >>>> any other layouts. Except the embedded-html - that content is now >>>> displayed correct, but in this case useless, because the hole page has >>>> no ,ayout anymore :-( >>>> >>>> >>>> And both option do NOT leave the xforms-control intact, but wipe them >>>> away - so my transforming and including of all xform-controls is >>>> useless >>>> unless i don't get them into my new page so that the will work :-(( But >>>> i need those xform-controls for displaying the embedded html-tags as >>>> you >>>> said, and also for the triggers, to link some of the data to other >>>> documents, that should be loaded when clicking on those links :-( >>>> Because of that i asked about the submissions through javascript, cause >>>> i think <a>-tags will work so far. Of course i would prefer >>>> <xform-trigger> now, after you gave me more information on that, but >>>> for >>>> that, i need those xform-controls to work that where insert by my >>>> stylesheet through the xslt-process. >>>> >>>> I hope that makes my problem more clear, i don't know what i else can >>>> do, i'm lost. >>>> The aim seems to be so near, while all i need is inside that >>>> result-instance you see - but i could not get it INTO my blank.xhtml so >>>> that the xform-control will work. >>>> >>>> In my opinion this seems to be straight forward how something like that >>>> should work, doesn't it? >>>> Query, Transform, Adding XForm-control, Put it into a new page, and >>>> tadaaa - A result-page showing exactly the searched data in a good >>>> layout with many links on it to get more details information through >>>> linked documents... >>>> Am i stupid to think it could and should be that easy? :-(( Than >>>> forgive >>>> me for causing you so much problems :-( >>>> >>>> Thanks for every help you gave me, >>>> Marcus >>>> >>>> >>>> >>> >>> >>> -- >>> Orbeon Forms - Web Forms for the Enterprise Done the Right Way >>> http://www.orbeon.com/ >>> >>> >> >> >> -------------------------------------------------------------------------------- >> >> >> >>> >>> -- >>> You receive this message as a subscriber of the >>> [hidden email] mailing list. >>> To unsubscribe: mailto:[hidden email] >>> For general help: mailto:[hidden email]?subject=help >>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws >>> > > > -- > Orbeon Forms - Web Forms for the Enterprise Done the Right Way > http://www.orbeon.com/ > > -------------------------------------------------------------------------------- > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
In reply to this post by Erik Bruchez
Hi Erik,
it me again, i forget to say, that this is just one problem! If the displayed page would go through the xforms-processor, so i could include xform-controls during the xsl-tranformation would be the best way, so i could link to other document by information in this one via new submission, so i could easyly request new docs from exist! BTW. Taking with Ryan brought up the point that changing and entering xform-controls to the theme-widgets, so i could use them for my menu and the languare-option causes some errors too. And at the moment i don't know which one is more worse. Is it possible to include models via <!-- Model to handle resources --> <xi:include href="oxf:/apps/common/resources-model.xml" xxi:omit-xml-base="true"/> and than use that model inside the theme-widgets? I think that is one of my problems displaying the new page here! This kind of including works with all other hardcoded xhtml pages inside my app, but not with the one you get from my example when pressing the second button. There i rescieve an "invalid model message" but only there!? I'll send you my widgets-theme as well, so perhaps you can see that error too, don't know if it comes up at the moment or you just get an empty table as result!? ----- Original Message ----- From: "Erik Bruchez" <[hidden email]> To: <[hidden email]> Sent: Wednesday, May 23, 2007 5:16 PM Subject: Re: [ops-users] Display HTML-Tags right? > Hi Marcus, > > I had a quick look at it. First, the content of <Inhalt> is: > > <exist:match > xmlns:exist="http://exist.sourceforge.net/NS/exist">Test</exist:match> > <strong><exist:match > xmlns:exist="http://exist.sourceforge.net/NS/exist">Test</exist:match></strong> > <em><exist:match > xmlns:exist="http://exist.sourceforge.net/NS/exist">Test</exist:match><br > /></em><div align="center"><exist:match > xmlns:exist="http://exist.sourceforge.net/NS/exist">Test</exist:match><br > /><div > align="left">x<sub>2<sup>4</sup></sub><sup>3</sup> > y<sup>3</sup><br > /><ul><li>1</li><li>2</li><li>3</li></ul><font > color="#ff0000">Rot<br /></font></div></div> > > I assume that this is where you have trouble. But first, I need to > understand what you want to do with the above, in particular with all > the <exist:match> elements. > > -Erik > > Marcus wrote: >> Hi Erik, >> finally i had time to build that extra test-app and i hope that will >> help to find a solution! >> Just unzip to RESOURCES/apps/ All files are in the subdir "marcus" Just >> add this to your main pfc and i hope it works! >> Thanks a lot for your help!!! >> >> Regards, Marcus >> >> >> >> ----- Original Message ----- From: "Erik Bruchez" <[hidden email]> >> To: <[hidden email]> >> Sent: Thursday, May 17, 2007 6:19 PM >> Subject: Re: [ops-users] Display HTML-Tags right? >> >> >>> Marcus, >>> >>> It's nice that you are sending all these details, but going through them >>> and understanding them in the abstract really takes a lot of time. >>> >>> What would be better would be to attach a zip of a very simple >>> application which we can simply unzip under RESOURCES/apps/ and run to >>> see the problem and attempt to find a solution. >>> >>> If you do this, don't even include the eXist layer: run your app, >>> extract the output of the eXist layer, and save it as a static file. You >>> get the idea: make it as easy as possible for somebody to run the code >>> and find a solution. Hopefully this is only a page flow with one entry, >>> a static file containing the result from eXist, an XPL file and/or XSLT >>> and/or XForms document. >>> >>> Then somebody can do: >>> >>> * Unzip >>> * Hit http://localhost:8080/ops/marcus >>> >>> And see the result. >>> >>> -Erik >>> >>> Marcus wrote: >>>> Hi Erik, hi all the others tried to help so far (Florian, Ryan) >>>> >>>> let me say in the first place, that i appreciate it very much, that you >>>> guys are trying to help me and spending your time in trying to >>>> understand my confused mails and my worse english. Thank you for all >>>> you >>>> do!!! But i'm still lost :-( >>>> My english isn't that good, that i could probably find the right words >>>> to explain the full exact situation :-(( >>>> I'm very sorry for that and that this causees so much confusion :-( >>>> >>>> I'll try it one more time to explain where exactly my problem lies and >>>> i >>>> hope that would make things a bit clearer.... >>>> So please think of the following szenario: >>>> >>>> 1. Search.xhtml: >>>> A Page in my webapp, showing all menus, the language-option and the >>>> stuff i could include with the theme-widgets. >>>> A singel input-field for fulltextsearch and a submit button. By >>>> entering >>>> text to the field you get a hand full of suggestions from the >>>> database-index starting with the enterd string. Push the button will >>>> start the submission for searching. >>>> >>>> 2. My submission: >>>> <xforms:submission id="search01" >>>> ref="xxforms:instance('search01-instance')" >>>> method="get" action="/search/service/search01" >>>> replace="all" f:url-type="resource"/> >>>> >>>> 3. My page-flow: >>>> <page id="search01" path-info="/search/service/search01" >>>> model="search01.xpl" view="blank.xhtml" >>>> default-submission="parameters.xml"> >>>> <setvalue ref="/parameters/search-criteria" >>>> parameter="search-criteria"/> >>>> </page> >>>> >>>> 4. My search01.xpl: >>>> <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" >>>> xmlns:oxf="http://www.orbeon.com/oxf/processors" >>>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >>>> xmlns:xdb="http://orbeon.org/oxf/xml/xmldb"> >>>> <p:param name="instance" type="input"/> >>>> <p:param name="data" type="output"/> >>>> <!-- Create search query for exist --> >>>> <p:processor name="oxf:xslt-2.0"> >>>> <p:input name="data" href="#instance"/> >>>> <p:input name="config"> >>>> <xdb:query xsl:version="2.0" collection="/db/kkbib/forms"> >>>> xquery version "1.0"; >>>> declare namespace >>>> xmldb="http://exist-db.org/xquery/xmldb"; >>>> import module namespace >>>> t="http://exist-db.org/xquery/text"; >>>> declare namespace >>>> fn="http://www.w3.org/2003/05/xpath-functions"; >>>> declare option exist:serialize >>>> "highlight-matches=elements method=xhtml >>>> media-type=application/xhtml+xml"; >>>> <!-- create tokenized values --> >>>> <xsl:variable name="search-criteria"> >>>> <xsl:choose> >>>> <xsl:when test="contains(//search-criteria,' >>>> ')"> >>>> ( >>>> <xsl:for-each >>>> select="tokenize(//search-criteria,' ')"> >>>> '<xsl:value-of select="."/>' >>>> <xsl:if test="not(position() = >>>> last())">,</xsl:if> >>>> </xsl:for-each> >>>> ) >>>> </xsl:when> >>>> <xsl:otherwise> >>>> '<xsl:value-of select="//search-criteria"/>' >>>> </xsl:otherwise> >>>> </xsl:choose> >>>> </xsl:variable> >>>> <result> >>>> <term> >>>> <xsl:value-of select="$search-criteria"/> >>>> </term> >>>> <item>{ >>>> let $hits := >>>> collection('/db/kkbib/forms/SIG')//form[text:match-all(.,<xsl:value-of >>>> select="$search-criteria"/>)] >>>> for $hit in $hits >>>> return >>>> $hit >>>> }</item> >>>> </result> >>>> </xdb:query> >>>> </p:input> >>>> <p:output name="data" id="search-query"/> >>>> </p:processor> >>>> <!-- query exist --> >>>> <p:processor name="oxf:xmldb-query"> >>>> <p:input name="datasource" href="datasource.xml"/> >>>> <p:input name="query" href="#search-query"/> >>>> <p:output name="data" id="search-result"/> >>>> </p:processor> >>>> <!-- Transform the results via XSLT --> >>>> <p:processor name="oxf:xslt"> >>>> <p:input name="config" href="layout-table.xsl"/> >>>> <p:input name="data" href="#search-result"/> >>>> <p:output name="data" ref="data"/> >>>> </p:processor> >>>> </p:config> >>>> >>>> >>>> 5. My layout-table.xsl: >>>> <?xml version="1.0" encoding="UTF-8"?> >>>> <xsl:stylesheet version="2.0" >>>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >>>> xmlns:xs="http://www.w3.org/2001/XMLSchema" >>>> xmlns:fn="http://www.w3.org/2005/xpath-functions" >>>> xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" >>>> xmlns:exist="http://exist.sourceforge.net/NS/exist" >>>> xmlns:xforms="http://www.w3.org/2002/xforms" >>>> xmlns="http://www.w3.org/1999/xhtml" >>>> xmlns:xi="http://www.w3.org/2001/XInclude" >>>> xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" > >>>> <xsl:output version="1.0" encoding="UTF-8" indent="yes" >>>> method="xhtml" media-type="text/html"/> >>>> >>>> <xsl:template match="exist:match"> >>>> <span class="xml-match"> >>>> <xsl:value-of select="."/> >>>> </span> >>>> </xsl:template> >>>> >>>> <xsl:template match="/"> >>>> <table><tr><td> >>>> <xsl:for-each select="result"> >>>> <xsl:for-each select="term"> >>>> <span style="font-style:italic; ">Suchbegriff: >>>> </span> >>>> <xsl:apply-templates select="."/> >>>> </xsl:for-each> >>>> <xsl:for-each select="item"> >>>> <xsl:for-each select="form"> >>>> <xsl:for-each select="Datensatz"> >>>> <br /> >>>> <h6> >>>> <xsl:for-each select="ID"> >>>> <span style="font-style:italic; >>>> ">Datensatz-ID: </span> >>>> <xsl:apply-templates /> >>>> </xsl:for-each> >>>> </h6> >>>> <xsl:for-each select="ASig"> >>>> <br /> >>>> <table border="1" width="100%"> >>>> <tbody> >>>> <tr> >>>> <td align="center" colspan="2"> >>>> <h1> >>>> <span >>>> style="font-style:italic; ">Alte Signatur: </span> >>>> <xsl:for-each >>>> select="ASTitel"> >>>> >>>> <xsl:apply-templates /> >>>> </xsl:for-each> >>>> </h1> >>>> </td> >>>> </tr> >>>> <tr> >>>> <td colspan="2" /> >>>> </tr> >>>> <tr> >>>> <td align="center" colspan="2"> >>>> <h2>Mittelalterl. >>>> Bibliothekskatalog (MBK)</h2> >>>> </td> >>>> </tr> >>>> <tr> >>>> <td colspan="2"> >>>> <xsl:for-each select="MBK"> >>>> <xsl:for-each >>>> select="KatEintrag"> >>>> <table border="1" >>>> width="100%"> >>>> <tbody> >>>> <tr> >>>> <td >>>> width="200"> >>>> >>>> <h4>Text</h4> >>>> </td> >>>> <td> >>>> <h4> >>>> >>>> <xsl:for-each select="Inhalt"> >>>> >>>> <!-- Here i try to put the xforms:output around the content which >>>> includes the embedded html! --> >>>> >>>> <xforms:output mediatype="text/html"> >>>> >>>> <xsl:apply-templates /> >>>> >>>> </xforms:output> >>>> >>>> >>>> </xsl:for-each> >>>> >>>> </h4> >>>> </td> >>>> </tr> >>>> <tr> >>>> <td >>>> width="200"> >>>> >>>> <h4>textkrit. Apparat (MBK III/3)</h4> >>>> </td> >>>> <td> >>>> <h4> >>>> >>>> <xsl:for-each select="Apparat"> >>>> >>>> <xsl:apply-templates /> >>>> >>>> </xsl:for-each> >>>> >>>> </h4> >>>> </td> >>>> </tr> >>>> </tbody> >>>> </table> >>>> </xsl:for-each> >>>> </xsl:for-each> >>>> </td> >>>> </tr> >>>> >>>> ... <!-- left a lot of other fields out to save space! --> >>>> >>>> <tr> >>>> <td align="center" colspan="2"> >>>> <h2>Bemerkungen</h2> >>>> </td> >>>> </tr> >>>> <tr> >>>> <td colspan="2"> >>>> <xsl:for-each >>>> select="Bemerkungen"> >>>> <xsl:apply-templates /> >>>> </xsl:for-each> >>>> </td> >>>> </tr> >>>> </tbody> >>>> </table> >>>> </xsl:for-each> >>>> <br /> >>>> >>>> ... <!-- left a lot of other fields out to save space! --> >>>> >>>> </xsl:for-each> >>>> </xsl:for-each> >>>> </xsl:for-each> >>>> </xsl:for-each> >>>> </td></tr></table> >>>> </xsl:template> >>>> </xsl:stylesheet> >>>> >>>> >>>> 6. The result of the XPL that i could add to the resulst-instance on my >>>> blank.xhtml.(copied from the instance inspector) >>>> --> :result-instance() >>>> >>>> <table xml:base="input:data" >>>> xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" >>>> xmlns:exist="http://exist.sourceforge.net/NS/exist" >>>> xmlns="http://www.w3.org/1999/xhtml" >>>> xmlns:xs="http://www.w3.org/2001/XMLSchema" >>>> xmlns:xforms="http://www.w3.org/2002/xforms" >>>> xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" >>>> xmlns:ev="http://www.w3.org/2001/xml-events" >>>> xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" >>>> xmlns:xi="http://www.w3.org/2001/XInclude" >>>> xmlns:fn="http://www.w3.org/2005/xpath-functions" >>>> xmlns:f="http://orbeon.org/oxf/xml/formatting" >>>> xmlns:xhtml="http://www.w3.org/1999/xhtml"> >>>> <tr><td> >>>> >>>> <span style="font-style:italic; ">Suchbegriff:</span>'test'<br/> >>>> <h6><span style="font-style:italic; ">Datensatz-ID:</span>1</h6><br/> >>>> <table border="1" width="100%"><tbody> >>>> <tr><td align="center" colspan="2"><h1><span style="font-style:italic; >>>> ">Alte Signatur:</span>asd</h1></td></tr> >>>> <tr><td colspan="2"/></tr><tr><td align="center" >>>> colspan="2"><h2>Mittelalterl. Bibliothekskatalog (MBK)</h2></td></tr> >>>> <tr><td colspan="2"><table border="1" width="100%"><tbody> >>>> <tr><td width="200"><h4>Text</h4></td><td><h4> >>>> >>>> <xforms:output mediatype="text/html"> >>>> <span class="xml-match">Test</span><strong><span >>>> class="xml-match">Test</span></strong> <em><span >>>> class="xml-match">Test</span><br /></em><div align="center"><span >>>> class="xml-match">Test</span><br /><div >>>> align="left">x<sub>2<sup>4</sup></sub><sup>3</sup> y<sup>3</sup><br >>>> /><ul><li>1</li><li>2</li><li>3</li></ul><font color="#ff0000">Rot<br >>>> /></font></div></div> >>>> </xforms:output> >>>> >>>> </h4></td></tr> >>>> <tr><td width="200"><h4>textkrit. Apparat (MBK >>>> III/3)</h4></td><td><h4/></td></tr> >>>> <tr><td width="200"><h4>Stellennachweis (MBK >>>> III/3)</h4></td><td><h4/></td></tr> >>>> <tr><td height="22" width="200"><h4>Volltext</h4></td><td >>>> height="22"><h4/></td></tr> >>>> </tbody></table></td></tr> >>>> >>>> ... <!-- left a lot of other fields out to save space! --> >>>> >>>> </td></tr></table> >>>> >>>> >>>> 7. My blank.xhtml: >>>> >>>> <html xmlns:xs="http://www.w3.org/2001/XMLSchema" >>>> xmlns:xforms="http://www.w3.org/2002/xforms" >>>> xmlns:ev="http://www.w3.org/2001/xml-events" >>>> xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" >>>> xmlns:f="http://orbeon.org/oxf/xml/formatting" >>>> xmlns:xhtml="http://www.w3.org/1999/xhtml" >>>> xmlns:xi="http://www.w3.org/2001/XInclude" >>>> xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" >>>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >>>> xmlns="http://www.w3.org/1999/xhtml" >>>> xmlns:exist="http://exist.sourceforge.net/NS/exist" xsl:version="2.0"> >>>> <head> >>>> <link rel="stylesheet" type="text/css" >>>> href="/apps/forms/style.css"/> >>>> <!-- Main XForms model --> >>>> <xforms:model id="common-model" >>>> xmlns:xforms="http://www.w3.org/2002/xforms"> >>>> <xforms:action ev:event="xforms-ready"> >>>> </xforms:action> >>>> <!-- Instance containing the page parameters --> >>>> <xforms:instance id="parameters-instance"> >>>> <xi:include href="input:instance" >>>> xxi:omit-xml-base="true"/> >>>> </xforms:instance> >>>> >>>> <xforms:instance id="result-instance"> >>>> <xi:include href="input:data"/> >>>> </xforms:instance> >>>> >>>> </xforms:model> >>>> <!-- Model to handle persistence --> >>>> <xi:include href="oxf:/apps/search/common/persistence-model.xml" >>>> xxi:omit-xml-base="true"/> >>>> <!-- Model to handle resources --> >>>> <xi:include href="oxf:/apps/search/common/resources-model.xml" >>>> xxi:omit-xml-base="true"/> >>>> >>>> <title>Result</title> >>>> </head> >>>> <body> >>>> <xhtml:p> >>>> <xforms:output >>>> value="xxforms:serialize(instance('result-instance'),'html')" >>>> mediatype="text/html" /> >>>> </xhtml:p><hr/> >>>> <xhtml:p> >>>> <xforms:output >>>> value="xxforms:serialize(instance('result-instance'),'text')" >>>> mediatype="text/html" /> >>>> </xhtml:p><hr/> >>>> <widget:xforms-instance-inspector >>>> xmlns:widget="http://orbeon.org/oxf/xml/widget"/> >>>> </body> >>>> </html> >>>> >>>> --> <xforms:output >>>> value="xxforms:serialize(instance('result-instance'),'html')" >>>> mediatype="text/html" /> >>>> This line display the right layout on my new page, all fields, all >>>> data, >>>> except the embedded html :( >>>> Looking to the source code, everything from the instance was inserted, >>>> except the <xforms:output media-type="text/html">-Tag - also the >>>> content >>>> of this field, but any more surrounded by the xforms:output, that >>>> should >>>> give me the right display of the embedded html as you said :-( >>>> >>>> --> <xforms:output >>>> value="xxforms:serialize(instance('result-instance'),'text')" >>>> mediatype="text/html" /> >>>> This line display all the content, but without any table structure or >>>> any other layouts. Except the embedded-html - that content is now >>>> displayed correct, but in this case useless, because the hole page has >>>> no ,ayout anymore :-( >>>> >>>> >>>> And both option do NOT leave the xforms-control intact, but wipe them >>>> away - so my transforming and including of all xform-controls is >>>> useless >>>> unless i don't get them into my new page so that the will work :-(( But >>>> i need those xform-controls for displaying the embedded html-tags as >>>> you >>>> said, and also for the triggers, to link some of the data to other >>>> documents, that should be loaded when clicking on those links :-( >>>> Because of that i asked about the submissions through javascript, cause >>>> i think <a>-tags will work so far. Of course i would prefer >>>> <xform-trigger> now, after you gave me more information on that, but >>>> for >>>> that, i need those xform-controls to work that where insert by my >>>> stylesheet through the xslt-process. >>>> >>>> I hope that makes my problem more clear, i don't know what i else can >>>> do, i'm lost. >>>> The aim seems to be so near, while all i need is inside that >>>> result-instance you see - but i could not get it INTO my blank.xhtml so >>>> that the xform-control will work. >>>> >>>> In my opinion this seems to be straight forward how something like that >>>> should work, doesn't it? >>>> Query, Transform, Adding XForm-control, Put it into a new page, and >>>> tadaaa - A result-page showing exactly the searched data in a good >>>> layout with many links on it to get more details information through >>>> linked documents... >>>> Am i stupid to think it could and should be that easy? :-(( Than >>>> forgive >>>> me for causing you so much problems :-( >>>> >>>> Thanks for every help you gave me, >>>> Marcus >>>> >>>> >>>> >>> >>> >>> -- >>> Orbeon Forms - Web Forms for the Enterprise Done the Right Way >>> http://www.orbeon.com/ >>> >>> >> >> >> -------------------------------------------------------------------------------- >> >> >> >>> >>> -- >>> You receive this message as a subscriber of the >>> [hidden email] mailing list. >>> To unsubscribe: mailto:[hidden email] >>> For general help: mailto:[hidden email]?subject=help >>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws >>> > > > -- > Orbeon Forms - Web Forms for the Enterprise Done the Right Way > http://www.orbeon.com/ > > -------------------------------------------------------------------------------- > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws xforms-widgets_new.xsl (27K) Download Attachment |
Administrator
|
In reply to this post by Marcus-2
Marcus,
Not sure if that can work for you, but I attach an example of view done with XForms which presents the data returned by query-result.xml. I test it this way: <page id="search-erik" path-info="/marcus/service/search-erik" model="query-result.xml" view="erik.xhtml"/> This is a solution without XSLT, just to show how you can display the HTML returned from eXist. Note that I just quickly pasted the layout from layout-table.xsl into erik.xhtml without checking whether it all made sense. -Erik Marcus wrote: > Hi Erik, > > so, thanks for your reply. > > Ok, i try it in short words to explain. > First of all, besides the <exist:match>-tags, this is the data stored in > the xml-file and that was entered with the wysiwyg-editor. The > <exist:match>-tags came from exist by setting and mark the searched > terms and the places where they were found inside my document! For > testing purpose i just replace them with a simple <span>-tag at the > moment within my xslt. Later, when this will work, i wanted to replace > them instead of a <span> with an <a href="#"> -tag as a text-anker, so i > can highlight and scroll the new page just to the place where the > searchterm is found in my data. The user should see the marked term in > the middle of his screen inside the whole document! So he can easyly > notice, why i got this doc as result! Does that make sence to you? > > Hope that helps!? > Thanks, Marcus > > > ----- Original Message ----- From: "Erik Bruchez" <[hidden email]> > To: <[hidden email]> > Sent: Wednesday, May 23, 2007 5:16 PM > Subject: Re: [ops-users] Display HTML-Tags right? > > >> Hi Marcus, >> >> I had a quick look at it. First, the content of <Inhalt> is: >> >> <exist:match >> xmlns:exist="http://exist.sourceforge.net/NS/exist">Test</exist:match> >> <strong><exist:match >> xmlns:exist="http://exist.sourceforge.net/NS/exist">Test</exist:match></strong> >> >> <em><exist:match >> xmlns:exist="http://exist.sourceforge.net/NS/exist">Test</exist:match><br >> >> /></em><div align="center"><exist:match >> xmlns:exist="http://exist.sourceforge.net/NS/exist">Test</exist:match><br >> >> /><div >> align="left">x<sub>2<sup>4</sup></sub><sup>3</sup> >> >> y<sup>3</sup><br >> /><ul><li>1</li><li>2</li><li>3</li></ul><font >> >> color="#ff0000">Rot<br /></font></div></div> >> >> I assume that this is where you have trouble. But first, I need to >> understand what you want to do with the above, in particular with all >> the <exist:match> elements. >> >> -Erik >> >> Marcus wrote: >>> Hi Erik, >>> finally i had time to build that extra test-app and i hope that will >>> help to find a solution! >>> Just unzip to RESOURCES/apps/ All files are in the subdir "marcus" Just >>> add this to your main pfc and i hope it works! >>> Thanks a lot for your help!!! >>> >>> Regards, Marcus >>> >>> >>> >>> ----- Original Message ----- From: "Erik Bruchez" <[hidden email]> >>> To: <[hidden email]> >>> Sent: Thursday, May 17, 2007 6:19 PM >>> Subject: Re: [ops-users] Display HTML-Tags right? >>> >>> >>>> Marcus, >>>> >>>> It's nice that you are sending all these details, but going through >>>> them >>>> and understanding them in the abstract really takes a lot of time. >>>> >>>> What would be better would be to attach a zip of a very simple >>>> application which we can simply unzip under RESOURCES/apps/ and run to >>>> see the problem and attempt to find a solution. >>>> >>>> If you do this, don't even include the eXist layer: run your app, >>>> extract the output of the eXist layer, and save it as a static file. >>>> You >>>> get the idea: make it as easy as possible for somebody to run the code >>>> and find a solution. Hopefully this is only a page flow with one entry, >>>> a static file containing the result from eXist, an XPL file and/or XSLT >>>> and/or XForms document. >>>> >>>> Then somebody can do: >>>> >>>> * Unzip >>>> * Hit http://localhost:8080/ops/marcus >>>> >>>> And see the result. >>>> >>>> -Erik >>>> >>>> Marcus wrote: >>>>> Hi Erik, hi all the others tried to help so far (Florian, Ryan) >>>>> >>>>> let me say in the first place, that i appreciate it very much, that >>>>> you >>>>> guys are trying to help me and spending your time in trying to >>>>> understand my confused mails and my worse english. Thank you for >>>>> all you >>>>> do!!! But i'm still lost :-( >>>>> My english isn't that good, that i could probably find the right words >>>>> to explain the full exact situation :-(( >>>>> I'm very sorry for that and that this causees so much confusion :-( >>>>> >>>>> I'll try it one more time to explain where exactly my problem lies >>>>> and i >>>>> hope that would make things a bit clearer.... >>>>> So please think of the following szenario: >>>>> >>>>> 1. Search.xhtml: >>>>> A Page in my webapp, showing all menus, the language-option and the >>>>> stuff i could include with the theme-widgets. >>>>> A singel input-field for fulltextsearch and a submit button. By >>>>> entering >>>>> text to the field you get a hand full of suggestions from the >>>>> database-index starting with the enterd string. Push the button will >>>>> start the submission for searching. >>>>> >>>>> 2. My submission: >>>>> <xforms:submission id="search01" >>>>> ref="xxforms:instance('search01-instance')" >>>>> method="get" action="/search/service/search01" >>>>> replace="all" f:url-type="resource"/> >>>>> >>>>> 3. My page-flow: >>>>> <page id="search01" path-info="/search/service/search01" >>>>> model="search01.xpl" view="blank.xhtml" >>>>> default-submission="parameters.xml"> >>>>> <setvalue ref="/parameters/search-criteria" >>>>> parameter="search-criteria"/> >>>>> </page> >>>>> >>>>> 4. My search01.xpl: >>>>> <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" >>>>> xmlns:oxf="http://www.orbeon.com/oxf/processors" >>>>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >>>>> xmlns:xdb="http://orbeon.org/oxf/xml/xmldb"> >>>>> <p:param name="instance" type="input"/> >>>>> <p:param name="data" type="output"/> >>>>> <!-- Create search query for exist --> >>>>> <p:processor name="oxf:xslt-2.0"> >>>>> <p:input name="data" href="#instance"/> >>>>> <p:input name="config"> >>>>> <xdb:query xsl:version="2.0" collection="/db/kkbib/forms"> >>>>> xquery version "1.0"; >>>>> declare namespace >>>>> xmldb="http://exist-db.org/xquery/xmldb"; >>>>> import module namespace >>>>> t="http://exist-db.org/xquery/text"; >>>>> declare namespace >>>>> fn="http://www.w3.org/2003/05/xpath-functions"; >>>>> declare option exist:serialize >>>>> "highlight-matches=elements method=xhtml >>>>> media-type=application/xhtml+xml"; >>>>> <!-- create tokenized values --> >>>>> <xsl:variable name="search-criteria"> >>>>> <xsl:choose> >>>>> <xsl:when test="contains(//search-criteria,' >>>>> ')"> >>>>> ( >>>>> <xsl:for-each >>>>> select="tokenize(//search-criteria,' ')"> >>>>> '<xsl:value-of select="."/>' >>>>> <xsl:if test="not(position() = >>>>> last())">,</xsl:if> >>>>> </xsl:for-each> >>>>> ) >>>>> </xsl:when> >>>>> <xsl:otherwise> >>>>> '<xsl:value-of >>>>> select="//search-criteria"/>' >>>>> </xsl:otherwise> >>>>> </xsl:choose> >>>>> </xsl:variable> >>>>> <result> >>>>> <term> >>>>> <xsl:value-of select="$search-criteria"/> >>>>> </term> >>>>> <item>{ >>>>> let $hits := >>>>> collection('/db/kkbib/forms/SIG')//form[text:match-all(.,<xsl:value-of >>>>> select="$search-criteria"/>)] >>>>> for $hit in $hits >>>>> return >>>>> $hit >>>>> }</item> >>>>> </result> >>>>> </xdb:query> >>>>> </p:input> >>>>> <p:output name="data" id="search-query"/> >>>>> </p:processor> >>>>> <!-- query exist --> >>>>> <p:processor name="oxf:xmldb-query"> >>>>> <p:input name="datasource" href="datasource.xml"/> >>>>> <p:input name="query" href="#search-query"/> >>>>> <p:output name="data" id="search-result"/> >>>>> </p:processor> >>>>> <!-- Transform the results via XSLT --> >>>>> <p:processor name="oxf:xslt"> >>>>> <p:input name="config" href="layout-table.xsl"/> >>>>> <p:input name="data" href="#search-result"/> >>>>> <p:output name="data" ref="data"/> >>>>> </p:processor> >>>>> </p:config> >>>>> >>>>> >>>>> 5. My layout-table.xsl: >>>>> <?xml version="1.0" encoding="UTF-8"?> >>>>> <xsl:stylesheet version="2.0" >>>>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >>>>> xmlns:xs="http://www.w3.org/2001/XMLSchema" >>>>> xmlns:fn="http://www.w3.org/2005/xpath-functions" >>>>> xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" >>>>> xmlns:exist="http://exist.sourceforge.net/NS/exist" >>>>> xmlns:xforms="http://www.w3.org/2002/xforms" >>>>> xmlns="http://www.w3.org/1999/xhtml" >>>>> xmlns:xi="http://www.w3.org/2001/XInclude" >>>>> xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" > >>>>> <xsl:output version="1.0" encoding="UTF-8" indent="yes" >>>>> method="xhtml" media-type="text/html"/> >>>>> >>>>> <xsl:template match="exist:match"> >>>>> <span class="xml-match"> >>>>> <xsl:value-of select="."/> >>>>> </span> >>>>> </xsl:template> >>>>> >>>>> <xsl:template match="/"> >>>>> <table><tr><td> >>>>> <xsl:for-each select="result"> >>>>> <xsl:for-each select="term"> >>>>> <span style="font-style:italic; ">Suchbegriff: >>>>> </span> >>>>> <xsl:apply-templates select="."/> >>>>> </xsl:for-each> >>>>> <xsl:for-each select="item"> >>>>> <xsl:for-each select="form"> >>>>> <xsl:for-each select="Datensatz"> >>>>> <br /> >>>>> <h6> >>>>> <xsl:for-each select="ID"> >>>>> <span style="font-style:italic; >>>>> ">Datensatz-ID: </span> >>>>> <xsl:apply-templates /> >>>>> </xsl:for-each> >>>>> </h6> >>>>> <xsl:for-each select="ASig"> >>>>> <br /> >>>>> <table border="1" width="100%"> >>>>> <tbody> >>>>> <tr> >>>>> <td align="center" colspan="2"> >>>>> <h1> >>>>> <span >>>>> style="font-style:italic; ">Alte Signatur: </span> >>>>> <xsl:for-each >>>>> select="ASTitel"> >>>>> >>>>> <xsl:apply-templates /> >>>>> </xsl:for-each> >>>>> </h1> >>>>> </td> >>>>> </tr> >>>>> <tr> >>>>> <td colspan="2" /> >>>>> </tr> >>>>> <tr> >>>>> <td align="center" colspan="2"> >>>>> <h2>Mittelalterl. >>>>> Bibliothekskatalog (MBK)</h2> >>>>> </td> >>>>> </tr> >>>>> <tr> >>>>> <td colspan="2"> >>>>> <xsl:for-each select="MBK"> >>>>> <xsl:for-each >>>>> select="KatEintrag"> >>>>> <table border="1" >>>>> width="100%"> >>>>> <tbody> >>>>> <tr> >>>>> <td >>>>> width="200"> >>>>> >>>>> <h4>Text</h4> >>>>> </td> >>>>> <td> >>>>> >>>>> <h4> >>>>> >>>>> <xsl:for-each select="Inhalt"> >>>>> >>>>> <!-- Here i try to put the xforms:output around the content which >>>>> includes the embedded html! --> >>>>> >>>>> <xforms:output mediatype="text/html"> >>>>> >>>>> <xsl:apply-templates /> >>>>> >>>>> </xforms:output> >>>>> >>>>> >>>>> </xsl:for-each> >>>>> >>>>> </h4> >>>>> </td> >>>>> </tr> >>>>> <tr> >>>>> <td >>>>> width="200"> >>>>> >>>>> <h4>textkrit. Apparat (MBK III/3)</h4> >>>>> </td> >>>>> <td> >>>>> >>>>> <h4> >>>>> >>>>> <xsl:for-each select="Apparat"> >>>>> >>>>> <xsl:apply-templates /> >>>>> >>>>> </xsl:for-each> >>>>> >>>>> </h4> >>>>> </td> >>>>> </tr> >>>>> </tbody> >>>>> </table> >>>>> </xsl:for-each> >>>>> </xsl:for-each> >>>>> </td> >>>>> </tr> >>>>> >>>>> ... <!-- left a lot of other fields out to save space! --> >>>>> >>>>> <tr> >>>>> <td align="center" colspan="2"> >>>>> <h2>Bemerkungen</h2> >>>>> </td> >>>>> </tr> >>>>> <tr> >>>>> <td colspan="2"> >>>>> <xsl:for-each >>>>> select="Bemerkungen"> >>>>> <xsl:apply-templates /> >>>>> </xsl:for-each> >>>>> </td> >>>>> </tr> >>>>> </tbody> >>>>> </table> >>>>> </xsl:for-each> >>>>> <br /> >>>>> >>>>> ... <!-- left a lot of other fields out to save space! --> >>>>> >>>>> </xsl:for-each> >>>>> </xsl:for-each> >>>>> </xsl:for-each> >>>>> </xsl:for-each> >>>>> </td></tr></table> >>>>> </xsl:template> >>>>> </xsl:stylesheet> >>>>> >>>>> >>>>> 6. The result of the XPL that i could add to the resulst-instance >>>>> on my >>>>> blank.xhtml.(copied from the instance inspector) >>>>> --> :result-instance() >>>>> >>>>> <table xml:base="input:data" >>>>> xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" >>>>> xmlns:exist="http://exist.sourceforge.net/NS/exist" >>>>> xmlns="http://www.w3.org/1999/xhtml" >>>>> xmlns:xs="http://www.w3.org/2001/XMLSchema" >>>>> xmlns:xforms="http://www.w3.org/2002/xforms" >>>>> xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" >>>>> xmlns:ev="http://www.w3.org/2001/xml-events" >>>>> xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" >>>>> xmlns:xi="http://www.w3.org/2001/XInclude" >>>>> xmlns:fn="http://www.w3.org/2005/xpath-functions" >>>>> xmlns:f="http://orbeon.org/oxf/xml/formatting" >>>>> xmlns:xhtml="http://www.w3.org/1999/xhtml"> >>>>> <tr><td> >>>>> >>>>> <span style="font-style:italic; ">Suchbegriff:</span>'test'<br/> >>>>> <h6><span style="font-style:italic; ">Datensatz-ID:</span>1</h6><br/> >>>>> <table border="1" width="100%"><tbody> >>>>> <tr><td align="center" colspan="2"><h1><span style="font-style:italic; >>>>> ">Alte Signatur:</span>asd</h1></td></tr> >>>>> <tr><td colspan="2"/></tr><tr><td align="center" >>>>> colspan="2"><h2>Mittelalterl. Bibliothekskatalog (MBK)</h2></td></tr> >>>>> <tr><td colspan="2"><table border="1" width="100%"><tbody> >>>>> <tr><td width="200"><h4>Text</h4></td><td><h4> >>>>> >>>>> <xforms:output mediatype="text/html"> >>>>> <span class="xml-match">Test</span><strong><span >>>>> class="xml-match">Test</span></strong> <em><span >>>>> class="xml-match">Test</span><br /></em><div align="center"><span >>>>> class="xml-match">Test</span><br /><div >>>>> align="left">x<sub>2<sup>4</sup></sub><sup>3</sup> y<sup>3</sup><br >>>>> /><ul><li>1</li><li>2</li><li>3</li></ul><font color="#ff0000">Rot<br >>>>> /></font></div></div> >>>>> </xforms:output> >>>>> >>>>> </h4></td></tr> >>>>> <tr><td width="200"><h4>textkrit. Apparat (MBK >>>>> III/3)</h4></td><td><h4/></td></tr> >>>>> <tr><td width="200"><h4>Stellennachweis (MBK >>>>> III/3)</h4></td><td><h4/></td></tr> >>>>> <tr><td height="22" width="200"><h4>Volltext</h4></td><td >>>>> height="22"><h4/></td></tr> >>>>> </tbody></table></td></tr> >>>>> >>>>> ... <!-- left a lot of other fields out to save space! --> >>>>> >>>>> </td></tr></table> >>>>> >>>>> >>>>> 7. My blank.xhtml: >>>>> >>>>> <html xmlns:xs="http://www.w3.org/2001/XMLSchema" >>>>> xmlns:xforms="http://www.w3.org/2002/xforms" >>>>> xmlns:ev="http://www.w3.org/2001/xml-events" >>>>> xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" >>>>> xmlns:f="http://orbeon.org/oxf/xml/formatting" >>>>> xmlns:xhtml="http://www.w3.org/1999/xhtml" >>>>> xmlns:xi="http://www.w3.org/2001/XInclude" >>>>> xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" >>>>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >>>>> xmlns="http://www.w3.org/1999/xhtml" >>>>> xmlns:exist="http://exist.sourceforge.net/NS/exist" xsl:version="2.0"> >>>>> <head> >>>>> <link rel="stylesheet" type="text/css" >>>>> href="/apps/forms/style.css"/> >>>>> <!-- Main XForms model --> >>>>> <xforms:model id="common-model" >>>>> xmlns:xforms="http://www.w3.org/2002/xforms"> >>>>> <xforms:action ev:event="xforms-ready"> >>>>> </xforms:action> >>>>> <!-- Instance containing the page parameters --> >>>>> <xforms:instance id="parameters-instance"> >>>>> <xi:include href="input:instance" >>>>> xxi:omit-xml-base="true"/> >>>>> </xforms:instance> >>>>> >>>>> <xforms:instance id="result-instance"> >>>>> <xi:include href="input:data"/> >>>>> </xforms:instance> >>>>> >>>>> </xforms:model> >>>>> <!-- Model to handle persistence --> >>>>> <xi:include >>>>> href="oxf:/apps/search/common/persistence-model.xml" >>>>> xxi:omit-xml-base="true"/> >>>>> <!-- Model to handle resources --> >>>>> <xi:include href="oxf:/apps/search/common/resources-model.xml" >>>>> xxi:omit-xml-base="true"/> >>>>> >>>>> <title>Result</title> >>>>> </head> >>>>> <body> >>>>> <xhtml:p> >>>>> <xforms:output >>>>> value="xxforms:serialize(instance('result-instance'),'html')" >>>>> mediatype="text/html" /> >>>>> </xhtml:p><hr/> >>>>> <xhtml:p> >>>>> <xforms:output >>>>> value="xxforms:serialize(instance('result-instance'),'text')" >>>>> mediatype="text/html" /> >>>>> </xhtml:p><hr/> >>>>> <widget:xforms-instance-inspector >>>>> xmlns:widget="http://orbeon.org/oxf/xml/widget"/> >>>>> </body> >>>>> </html> >>>>> >>>>> --> <xforms:output >>>>> value="xxforms:serialize(instance('result-instance'),'html')" >>>>> mediatype="text/html" /> >>>>> This line display the right layout on my new page, all fields, all >>>>> data, >>>>> except the embedded html :( >>>>> Looking to the source code, everything from the instance was inserted, >>>>> except the <xforms:output media-type="text/html">-Tag - also the >>>>> content >>>>> of this field, but any more surrounded by the xforms:output, that >>>>> should >>>>> give me the right display of the embedded html as you said :-( >>>>> >>>>> --> <xforms:output >>>>> value="xxforms:serialize(instance('result-instance'),'text')" >>>>> mediatype="text/html" /> >>>>> This line display all the content, but without any table structure or >>>>> any other layouts. Except the embedded-html - that content is now >>>>> displayed correct, but in this case useless, because the hole page has >>>>> no ,ayout anymore :-( >>>>> >>>>> >>>>> And both option do NOT leave the xforms-control intact, but wipe them >>>>> away - so my transforming and including of all xform-controls is >>>>> useless >>>>> unless i don't get them into my new page so that the will work :-(( >>>>> But >>>>> i need those xform-controls for displaying the embedded html-tags >>>>> as you >>>>> said, and also for the triggers, to link some of the data to other >>>>> documents, that should be loaded when clicking on those links :-( >>>>> Because of that i asked about the submissions through javascript, >>>>> cause >>>>> i think <a>-tags will work so far. Of course i would prefer >>>>> <xform-trigger> now, after you gave me more information on that, >>>>> but for >>>>> that, i need those xform-controls to work that where insert by my >>>>> stylesheet through the xslt-process. >>>>> >>>>> I hope that makes my problem more clear, i don't know what i else can >>>>> do, i'm lost. >>>>> The aim seems to be so near, while all i need is inside that >>>>> result-instance you see - but i could not get it INTO my >>>>> blank.xhtml so >>>>> that the xform-control will work. >>>>> >>>>> In my opinion this seems to be straight forward how something like >>>>> that >>>>> should work, doesn't it? >>>>> Query, Transform, Adding XForm-control, Put it into a new page, and >>>>> tadaaa - A result-page showing exactly the searched data in a good >>>>> layout with many links on it to get more details information through >>>>> linked documents... >>>>> Am i stupid to think it could and should be that easy? :-(( Than >>>>> forgive >>>>> me for causing you so much problems :-( >>>>> >>>>> Thanks for every help you gave me, >>>>> Marcus >>>>> >>>>> >>>>> >>>> >>>> >>>> -- >>>> Orbeon Forms - Web Forms for the Enterprise Done the Right Way >>>> http://www.orbeon.com/ >>>> >>>> >>> >>> >>> -------------------------------------------------------------------------------- >>> >>> >>> >>> >>>> >>>> -- >>>> You receive this message as a subscriber of the >>>> [hidden email] mailing list. >>>> To unsubscribe: mailto:[hidden email] >>>> For general help: mailto:[hidden email]?subject=help >>>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws >>>> >> >> >> -- >> Orbeon Forms - Web Forms for the Enterprise Done the Right Way >> http://www.orbeon.com/ >> >> > > > -------------------------------------------------------------------------------- > > > >> >> -- >> You receive this message as a subscriber of the >> [hidden email] mailing list. >> To unsubscribe: mailto:[hidden email] >> For general help: mailto:[hidden email]?subject=help >> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws >> > > -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws erik.xhtml (20K) Download Attachment |
Hi Erik,
thanks for your time, but that exactly the way i DON'T wanted to do this! Getting the result in an instance and than all hardcode with xforms :-(( I'm pretty sure i mentioned that a cuple of times, didn't i? Sorry for that, but i need a solution to do this with XSLT and than get this tranformed page with new xform-controls through any processor that will turn it into an working xhtml-page! This way, to do it all in xforms should be the last possibility, but as i see and after over one week of getting no other ways work, this seems to be the only way now and thats not satisfying! And for your example. I need those exist:match-tags as well! Before displaying the data to the user, those tags <exist:match>(...searchterm...)</exist:match> should be replaced with somthing like <a href="#anker"><span class="highlight">(..searchterm...)</span></a> So my way i'm realy looking forward to is: 1. Entering search term 2. Sending searchterm to the XPL: 2a Building xquery 2b Requesting eXist 2c Getting results back 2d Transform those results with XSLT 2d1 Bring the data into an table view <!-- This was the first problem, still there at the moment --> 2d2 Adding xform-controls for displaying the embedded html <!-- First problem end --> 2d3 Adding xform-controls as triggers for new Request, based on result data that link to other documents 2d4 Highlight and mark <exist:match>-tags as Textankers to show the user WHERE he finds his searched term in the doc <!-- THIS IS THE MAIN PROBLEM --> 3 Get this transformed Results including xform-controls back to a new page and make it work - i think transform it to xhtml or something that will work on the browser with the ajax stuff included... <!-- PROBLEM END --> Sorry, but i tried to explain this a cuple of times and i'm very soory if my english is that worse, that you couldn't get the point until now. I hardly try to do the best i can i describe what i'm trying to do, but i'm lost now, because i can't think of any other way to explain it more detailed :-.( Thanks for your time guys, at least i think i must do this all with xforms only, because no one seems to get the point and to bring up an alternative solution that works. Sorry for wasting your time :-( But if you got the point now - perhaps you should work on a solution in the future that will fullfill this need! -> Being able to produce a new page including xform-controls with XSLT and find a way to make this a working one in the browser! That would be great! I asked sometime if it possible to add some other processors to my own xpl, that will do that for me - perhaps one can copy some steps from the xforms-epiloge - but i tried that and failed - surely because i don't know enough about what each processor is doing and what result he produces exactly, so i don't know where to step in and where to finish, so that my results will be tranformed just the way the xforms-epilogue does it normaly. Have a nice day! Any further ideas are very welcom and appriciated, best regards, Marcus ----- Original Message ----- From: "Erik Bruchez" <[hidden email]> To: <[hidden email]> Sent: Thursday, May 24, 2007 4:54 AM Subject: Re: [ops-users] Display HTML-Tags right? > Marcus, > > Not sure if that can work for you, but I attach an example of view done > with XForms which presents the data returned by query-result.xml. I test > it this way: > > <page id="search-erik" path-info="/marcus/service/search-erik" > model="query-result.xml" view="erik.xhtml"/> > > This is a solution without XSLT, just to show how you can display the > HTML returned from eXist. > > Note that I just quickly pasted the layout from layout-table.xsl into > erik.xhtml without checking whether it all made sense. > > -Erik > > Marcus wrote: >> Hi Erik, >> >> so, thanks for your reply. >> >> Ok, i try it in short words to explain. >> First of all, besides the <exist:match>-tags, this is the data stored in >> the xml-file and that was entered with the wysiwyg-editor. The >> <exist:match>-tags came from exist by setting and mark the searched >> terms and the places where they were found inside my document! For >> testing purpose i just replace them with a simple <span>-tag at the >> moment within my xslt. Later, when this will work, i wanted to replace >> them instead of a <span> with an <a href="#"> -tag as a text-anker, so i >> can highlight and scroll the new page just to the place where the >> searchterm is found in my data. The user should see the marked term in >> the middle of his screen inside the whole document! So he can easyly >> notice, why i got this doc as result! Does that make sence to you? >> >> Hope that helps!? >> Thanks, Marcus >> -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
In reply to this post by Erik Bruchez
Hi Erik,
so here is a new question based on your example you send me! As i said, i need to do this with xsl, and at the moment i am so far that i can transform my results to an xhtml-page with xform-controls on it and what i tested so far is a normal xforms:output that worked, what mean it is transformed to a normal span-tag. So the first step seems to be done! <xforms:output model="resources-model" value=" 'embedded html' "/> This one works! And now i tried to insert your statement: <xforms:output mediatype="text/html"> <xsl:attribute name="value"> <xsl:value-of select="(string-join(node(),''))" /> </xsl:attribute> </xforms:output> That should work to, while yours does as well on your erik-xhtml page, but it causees this error: XPath syntax error at char 45 on line 2 in {... Test <strong>Test}: expected ")", found ">" So, i tried different versions, but got none to work :-( Perhaps that helps and you've got another idea from now on? Thanks, Marcus ----- Original Message ----- From: "Erik Bruchez" <[hidden email]> To: <[hidden email]> Sent: Thursday, May 24, 2007 4:54 AM Subject: Re: [ops-users] Display HTML-Tags right? > Marcus, > > Not sure if that can work for you, but I attach an example of view done > with XForms which presents the data returned by query-result.xml. I test > it this way: > > <page id="search-erik" path-info="/marcus/service/search-erik" > model="query-result.xml" view="erik.xhtml"/> > > This is a solution without XSLT, just to show how you can display the > HTML returned from eXist. > > Note that I just quickly pasted the layout from layout-table.xsl into > erik.xhtml without checking whether it all made sense. > > -Erik > > Marcus wrote: >> Hi Erik, >> >> so, thanks for your reply. >> >> Ok, i try it in short words to explain. >> First of all, besides the <exist:match>-tags, this is the data stored in >> the xml-file and that was entered with the wysiwyg-editor. The >> <exist:match>-tags came from exist by setting and mark the searched >> terms and the places where they were found inside my document! For >> testing purpose i just replace them with a simple <span>-tag at the >> moment within my xslt. Later, when this will work, i wanted to replace >> them instead of a <span> with an <a href="#"> -tag as a text-anker, so i >> can highlight and scroll the new page just to the place where the >> searchterm is found in my data. The user should see the marked term in >> the middle of his screen inside the whole document! So he can easyly >> notice, why i got this doc as result! Does that make sence to you? >> >> Hope that helps!? >> Thanks, Marcus >> >> >> ----- Original Message ----- From: "Erik Bruchez" <[hidden email]> >> To: <[hidden email]> >> Sent: Wednesday, May 23, 2007 5:16 PM >> Subject: Re: [ops-users] Display HTML-Tags right? >> >> >>> Hi Marcus, >>> >>> I had a quick look at it. First, the content of <Inhalt> is: >>> >>> <exist:match >>> xmlns:exist="http://exist.sourceforge.net/NS/exist">Test</exist:match> >>> <strong><exist:match >>> xmlns:exist="http://exist.sourceforge.net/NS/exist">Test</exist:match></strong> >>> >>> <em><exist:match >>> xmlns:exist="http://exist.sourceforge.net/NS/exist">Test</exist:match><br >>> >>> /></em><div align="center"><exist:match >>> xmlns:exist="http://exist.sourceforge.net/NS/exist">Test</exist:match><br >>> >>> /><div >>> align="left">x<sub>2<sup>4</sup></sub><sup>3</sup> >>> >>> y<sup>3</sup><br >>> /><ul><li>1</li><li>2</li><li>3</li></ul><font >>> >>> color="#ff0000">Rot<br /></font></div></div> >>> >>> I assume that this is where you have trouble. But first, I need to >>> understand what you want to do with the above, in particular with all >>> the <exist:match> elements. >>> >>> -Erik >>> >>> Marcus wrote: >>>> Hi Erik, >>>> finally i had time to build that extra test-app and i hope that will >>>> help to find a solution! >>>> Just unzip to RESOURCES/apps/ All files are in the subdir "marcus" Just >>>> add this to your main pfc and i hope it works! >>>> Thanks a lot for your help!!! >>>> >>>> Regards, Marcus >>>> >>>> >>>> >>>> ----- Original Message ----- From: "Erik Bruchez" <[hidden email]> >>>> To: <[hidden email]> >>>> Sent: Thursday, May 17, 2007 6:19 PM >>>> Subject: Re: [ops-users] Display HTML-Tags right? >>>> >>>> >>>>> Marcus, >>>>> >>>>> It's nice that you are sending all these details, but going through >>>>> them >>>>> and understanding them in the abstract really takes a lot of time. >>>>> >>>>> What would be better would be to attach a zip of a very simple >>>>> application which we can simply unzip under RESOURCES/apps/ and run to >>>>> see the problem and attempt to find a solution. >>>>> >>>>> If you do this, don't even include the eXist layer: run your app, >>>>> extract the output of the eXist layer, and save it as a static file. >>>>> You >>>>> get the idea: make it as easy as possible for somebody to run the code >>>>> and find a solution. Hopefully this is only a page flow with one >>>>> entry, >>>>> a static file containing the result from eXist, an XPL file and/or >>>>> XSLT >>>>> and/or XForms document. >>>>> >>>>> Then somebody can do: >>>>> >>>>> * Unzip >>>>> * Hit http://localhost:8080/ops/marcus >>>>> >>>>> And see the result. >>>>> >>>>> -Erik >>>>> >>>>> Marcus wrote: >>>>>> Hi Erik, hi all the others tried to help so far (Florian, Ryan) >>>>>> >>>>>> let me say in the first place, that i appreciate it very much, that >>>>>> you >>>>>> guys are trying to help me and spending your time in trying to >>>>>> understand my confused mails and my worse english. Thank you for >>>>>> all you >>>>>> do!!! But i'm still lost :-( >>>>>> My english isn't that good, that i could probably find the right >>>>>> words >>>>>> to explain the full exact situation :-(( >>>>>> I'm very sorry for that and that this causees so much confusion :-( >>>>>> >>>>>> I'll try it one more time to explain where exactly my problem lies >>>>>> and i >>>>>> hope that would make things a bit clearer.... >>>>>> So please think of the following szenario: >>>>>> >>>>>> 1. Search.xhtml: >>>>>> A Page in my webapp, showing all menus, the language-option and the >>>>>> stuff i could include with the theme-widgets. >>>>>> A singel input-field for fulltextsearch and a submit button. By >>>>>> entering >>>>>> text to the field you get a hand full of suggestions from the >>>>>> database-index starting with the enterd string. Push the button will >>>>>> start the submission for searching. >>>>>> >>>>>> 2. My submission: >>>>>> <xforms:submission id="search01" >>>>>> ref="xxforms:instance('search01-instance')" >>>>>> method="get" action="/search/service/search01" >>>>>> replace="all" f:url-type="resource"/> >>>>>> >>>>>> 3. My page-flow: >>>>>> <page id="search01" path-info="/search/service/search01" >>>>>> model="search01.xpl" view="blank.xhtml" >>>>>> default-submission="parameters.xml"> >>>>>> <setvalue ref="/parameters/search-criteria" >>>>>> parameter="search-criteria"/> >>>>>> </page> >>>>>> >>>>>> 4. My search01.xpl: >>>>>> <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" >>>>>> xmlns:oxf="http://www.orbeon.com/oxf/processors" >>>>>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >>>>>> xmlns:xdb="http://orbeon.org/oxf/xml/xmldb"> >>>>>> <p:param name="instance" type="input"/> >>>>>> <p:param name="data" type="output"/> >>>>>> <!-- Create search query for exist --> >>>>>> <p:processor name="oxf:xslt-2.0"> >>>>>> <p:input name="data" href="#instance"/> >>>>>> <p:input name="config"> >>>>>> <xdb:query xsl:version="2.0" collection="/db/kkbib/forms"> >>>>>> xquery version "1.0"; >>>>>> declare namespace >>>>>> xmldb="http://exist-db.org/xquery/xmldb"; >>>>>> import module namespace >>>>>> t="http://exist-db.org/xquery/text"; >>>>>> declare namespace >>>>>> fn="http://www.w3.org/2003/05/xpath-functions"; >>>>>> declare option exist:serialize >>>>>> "highlight-matches=elements method=xhtml >>>>>> media-type=application/xhtml+xml"; >>>>>> <!-- create tokenized values --> >>>>>> <xsl:variable name="search-criteria"> >>>>>> <xsl:choose> >>>>>> <xsl:when test="contains(//search-criteria,' >>>>>> ')"> >>>>>> ( >>>>>> <xsl:for-each >>>>>> select="tokenize(//search-criteria,' ')"> >>>>>> '<xsl:value-of select="."/>' >>>>>> <xsl:if test="not(position() = >>>>>> last())">,</xsl:if> >>>>>> </xsl:for-each> >>>>>> ) >>>>>> </xsl:when> >>>>>> <xsl:otherwise> >>>>>> '<xsl:value-of >>>>>> select="//search-criteria"/>' >>>>>> </xsl:otherwise> >>>>>> </xsl:choose> >>>>>> </xsl:variable> >>>>>> <result> >>>>>> <term> >>>>>> <xsl:value-of select="$search-criteria"/> >>>>>> </term> >>>>>> <item>{ >>>>>> let $hits := >>>>>> collection('/db/kkbib/forms/SIG')//form[text:match-all(.,<xsl:value-of >>>>>> select="$search-criteria"/>)] >>>>>> for $hit in $hits >>>>>> return >>>>>> $hit >>>>>> }</item> >>>>>> </result> >>>>>> </xdb:query> >>>>>> </p:input> >>>>>> <p:output name="data" id="search-query"/> >>>>>> </p:processor> >>>>>> <!-- query exist --> >>>>>> <p:processor name="oxf:xmldb-query"> >>>>>> <p:input name="datasource" href="datasource.xml"/> >>>>>> <p:input name="query" href="#search-query"/> >>>>>> <p:output name="data" id="search-result"/> >>>>>> </p:processor> >>>>>> <!-- Transform the results via XSLT --> >>>>>> <p:processor name="oxf:xslt"> >>>>>> <p:input name="config" href="layout-table.xsl"/> >>>>>> <p:input name="data" href="#search-result"/> >>>>>> <p:output name="data" ref="data"/> >>>>>> </p:processor> >>>>>> </p:config> >>>>>> >>>>>> >>>>>> 5. My layout-table.xsl: >>>>>> <?xml version="1.0" encoding="UTF-8"?> >>>>>> <xsl:stylesheet version="2.0" >>>>>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >>>>>> xmlns:xs="http://www.w3.org/2001/XMLSchema" >>>>>> xmlns:fn="http://www.w3.org/2005/xpath-functions" >>>>>> xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" >>>>>> xmlns:exist="http://exist.sourceforge.net/NS/exist" >>>>>> xmlns:xforms="http://www.w3.org/2002/xforms" >>>>>> xmlns="http://www.w3.org/1999/xhtml" >>>>>> xmlns:xi="http://www.w3.org/2001/XInclude" >>>>>> xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" > >>>>>> <xsl:output version="1.0" encoding="UTF-8" indent="yes" >>>>>> method="xhtml" media-type="text/html"/> >>>>>> >>>>>> <xsl:template match="exist:match"> >>>>>> <span class="xml-match"> >>>>>> <xsl:value-of select="."/> >>>>>> </span> >>>>>> </xsl:template> >>>>>> >>>>>> <xsl:template match="/"> >>>>>> <table><tr><td> >>>>>> <xsl:for-each select="result"> >>>>>> <xsl:for-each select="term"> >>>>>> <span style="font-style:italic; ">Suchbegriff: >>>>>> </span> >>>>>> <xsl:apply-templates select="."/> >>>>>> </xsl:for-each> >>>>>> <xsl:for-each select="item"> >>>>>> <xsl:for-each select="form"> >>>>>> <xsl:for-each select="Datensatz"> >>>>>> <br /> >>>>>> <h6> >>>>>> <xsl:for-each select="ID"> >>>>>> <span style="font-style:italic; >>>>>> ">Datensatz-ID: </span> >>>>>> <xsl:apply-templates /> >>>>>> </xsl:for-each> >>>>>> </h6> >>>>>> <xsl:for-each select="ASig"> >>>>>> <br /> >>>>>> <table border="1" width="100%"> >>>>>> <tbody> >>>>>> <tr> >>>>>> <td align="center" >>>>>> colspan="2"> >>>>>> <h1> >>>>>> <span >>>>>> style="font-style:italic; ">Alte Signatur: </span> >>>>>> <xsl:for-each >>>>>> select="ASTitel"> >>>>>> >>>>>> <xsl:apply-templates /> >>>>>> </xsl:for-each> >>>>>> </h1> >>>>>> </td> >>>>>> </tr> >>>>>> <tr> >>>>>> <td colspan="2" /> >>>>>> </tr> >>>>>> <tr> >>>>>> <td align="center" >>>>>> colspan="2"> >>>>>> <h2>Mittelalterl. >>>>>> Bibliothekskatalog (MBK)</h2> >>>>>> </td> >>>>>> </tr> >>>>>> <tr> >>>>>> <td colspan="2"> >>>>>> <xsl:for-each >>>>>> select="MBK"> >>>>>> <xsl:for-each >>>>>> select="KatEintrag"> >>>>>> <table border="1" >>>>>> width="100%"> >>>>>> <tbody> >>>>>> <tr> >>>>>> <td >>>>>> width="200"> >>>>>> >>>>>> <h4>Text</h4> >>>>>> </td> >>>>>> <td> >>>>>> >>>>>> <h4> >>>>>> >>>>>> <xsl:for-each select="Inhalt"> >>>>>> >>>>>> <!-- Here i try to put the xforms:output around the content which >>>>>> includes the embedded html! --> >>>>>> >>>>>> <xforms:output mediatype="text/html"> >>>>>> >>>>>> <xsl:apply-templates /> >>>>>> >>>>>> </xforms:output> >>>>>> >>>>>> >>>>>> </xsl:for-each> >>>>>> >>>>>> </h4> >>>>>> </td> >>>>>> </tr> >>>>>> <tr> >>>>>> <td >>>>>> width="200"> >>>>>> >>>>>> <h4>textkrit. Apparat (MBK III/3)</h4> >>>>>> </td> >>>>>> <td> >>>>>> >>>>>> <h4> >>>>>> >>>>>> <xsl:for-each select="Apparat"> >>>>>> >>>>>> <xsl:apply-templates /> >>>>>> >>>>>> </xsl:for-each> >>>>>> >>>>>> </h4> >>>>>> </td> >>>>>> </tr> >>>>>> </tbody> >>>>>> </table> >>>>>> </xsl:for-each> >>>>>> </xsl:for-each> >>>>>> </td> >>>>>> </tr> >>>>>> >>>>>> ... <!-- left a lot of other fields out to save space! --> >>>>>> >>>>>> <tr> >>>>>> <td align="center" >>>>>> colspan="2"> >>>>>> <h2>Bemerkungen</h2> >>>>>> </td> >>>>>> </tr> >>>>>> <tr> >>>>>> <td colspan="2"> >>>>>> <xsl:for-each >>>>>> select="Bemerkungen"> >>>>>> <xsl:apply-templates >>>>>> /> >>>>>> </xsl:for-each> >>>>>> </td> >>>>>> </tr> >>>>>> </tbody> >>>>>> </table> >>>>>> </xsl:for-each> >>>>>> <br /> >>>>>> >>>>>> ... <!-- left a lot of other fields out to save space! --> >>>>>> >>>>>> </xsl:for-each> >>>>>> </xsl:for-each> >>>>>> </xsl:for-each> >>>>>> </xsl:for-each> >>>>>> </td></tr></table> >>>>>> </xsl:template> >>>>>> </xsl:stylesheet> >>>>>> >>>>>> >>>>>> 6. The result of the XPL that i could add to the resulst-instance >>>>>> on my >>>>>> blank.xhtml.(copied from the instance inspector) >>>>>> --> :result-instance() >>>>>> >>>>>> <table xml:base="input:data" >>>>>> xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" >>>>>> xmlns:exist="http://exist.sourceforge.net/NS/exist" >>>>>> xmlns="http://www.w3.org/1999/xhtml" >>>>>> xmlns:xs="http://www.w3.org/2001/XMLSchema" >>>>>> xmlns:xforms="http://www.w3.org/2002/xforms" >>>>>> xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" >>>>>> xmlns:ev="http://www.w3.org/2001/xml-events" >>>>>> xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" >>>>>> xmlns:xi="http://www.w3.org/2001/XInclude" >>>>>> xmlns:fn="http://www.w3.org/2005/xpath-functions" >>>>>> xmlns:f="http://orbeon.org/oxf/xml/formatting" >>>>>> xmlns:xhtml="http://www.w3.org/1999/xhtml"> >>>>>> <tr><td> >>>>>> >>>>>> <span style="font-style:italic; ">Suchbegriff:</span>'test'<br/> >>>>>> <h6><span style="font-style:italic; ">Datensatz-ID:</span>1</h6><br/> >>>>>> <table border="1" width="100%"><tbody> >>>>>> <tr><td align="center" colspan="2"><h1><span >>>>>> style="font-style:italic; >>>>>> ">Alte Signatur:</span>asd</h1></td></tr> >>>>>> <tr><td colspan="2"/></tr><tr><td align="center" >>>>>> colspan="2"><h2>Mittelalterl. Bibliothekskatalog (MBK)</h2></td></tr> >>>>>> <tr><td colspan="2"><table border="1" width="100%"><tbody> >>>>>> <tr><td width="200"><h4>Text</h4></td><td><h4> >>>>>> >>>>>> <xforms:output mediatype="text/html"> >>>>>> <span class="xml-match">Test</span><strong><span >>>>>> class="xml-match">Test</span></strong> <em><span >>>>>> class="xml-match">Test</span><br /></em><div align="center"><span >>>>>> class="xml-match">Test</span><br /><div >>>>>> align="left">x<sub>2<sup>4</sup></sub><sup>3</sup> y<sup>3</sup><br >>>>>> /><ul><li>1</li><li>2</li><li>3</li></ul><font color="#ff0000">Rot<br >>>>>> /></font></div></div> >>>>>> </xforms:output> >>>>>> >>>>>> </h4></td></tr> >>>>>> <tr><td width="200"><h4>textkrit. Apparat (MBK >>>>>> III/3)</h4></td><td><h4/></td></tr> >>>>>> <tr><td width="200"><h4>Stellennachweis (MBK >>>>>> III/3)</h4></td><td><h4/></td></tr> >>>>>> <tr><td height="22" width="200"><h4>Volltext</h4></td><td >>>>>> height="22"><h4/></td></tr> >>>>>> </tbody></table></td></tr> >>>>>> >>>>>> ... <!-- left a lot of other fields out to save space! --> >>>>>> >>>>>> </td></tr></table> >>>>>> >>>>>> >>>>>> 7. My blank.xhtml: >>>>>> >>>>>> <html xmlns:xs="http://www.w3.org/2001/XMLSchema" >>>>>> xmlns:xforms="http://www.w3.org/2002/xforms" >>>>>> xmlns:ev="http://www.w3.org/2001/xml-events" >>>>>> xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" >>>>>> xmlns:f="http://orbeon.org/oxf/xml/formatting" >>>>>> xmlns:xhtml="http://www.w3.org/1999/xhtml" >>>>>> xmlns:xi="http://www.w3.org/2001/XInclude" >>>>>> xmlns:xxi="http://orbeon.org/oxf/xml/xinclude" >>>>>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >>>>>> xmlns="http://www.w3.org/1999/xhtml" >>>>>> xmlns:exist="http://exist.sourceforge.net/NS/exist" >>>>>> xsl:version="2.0"> >>>>>> <head> >>>>>> <link rel="stylesheet" type="text/css" >>>>>> href="/apps/forms/style.css"/> >>>>>> <!-- Main XForms model --> >>>>>> <xforms:model id="common-model" >>>>>> xmlns:xforms="http://www.w3.org/2002/xforms"> >>>>>> <xforms:action ev:event="xforms-ready"> >>>>>> </xforms:action> >>>>>> <!-- Instance containing the page parameters --> >>>>>> <xforms:instance id="parameters-instance"> >>>>>> <xi:include href="input:instance" >>>>>> xxi:omit-xml-base="true"/> >>>>>> </xforms:instance> >>>>>> >>>>>> <xforms:instance id="result-instance"> >>>>>> <xi:include href="input:data"/> >>>>>> </xforms:instance> >>>>>> >>>>>> </xforms:model> >>>>>> <!-- Model to handle persistence --> >>>>>> <xi:include >>>>>> href="oxf:/apps/search/common/persistence-model.xml" >>>>>> xxi:omit-xml-base="true"/> >>>>>> <!-- Model to handle resources --> >>>>>> <xi:include href="oxf:/apps/search/common/resources-model.xml" >>>>>> xxi:omit-xml-base="true"/> >>>>>> >>>>>> <title>Result</title> >>>>>> </head> >>>>>> <body> >>>>>> <xhtml:p> >>>>>> <xforms:output >>>>>> value="xxforms:serialize(instance('result-instance'),'html')" >>>>>> mediatype="text/html" /> >>>>>> </xhtml:p><hr/> >>>>>> <xhtml:p> >>>>>> <xforms:output >>>>>> value="xxforms:serialize(instance('result-instance'),'text')" >>>>>> mediatype="text/html" /> >>>>>> </xhtml:p><hr/> >>>>>> <widget:xforms-instance-inspector >>>>>> xmlns:widget="http://orbeon.org/oxf/xml/widget"/> >>>>>> </body> >>>>>> </html> >>>>>> >>>>>> --> <xforms:output >>>>>> value="xxforms:serialize(instance('result-instance'),'html')" >>>>>> mediatype="text/html" /> >>>>>> This line display the right layout on my new page, all fields, all >>>>>> data, >>>>>> except the embedded html :( >>>>>> Looking to the source code, everything from the instance was >>>>>> inserted, >>>>>> except the <xforms:output media-type="text/html">-Tag - also the >>>>>> content >>>>>> of this field, but any more surrounded by the xforms:output, that >>>>>> should >>>>>> give me the right display of the embedded html as you said :-( >>>>>> >>>>>> --> <xforms:output >>>>>> value="xxforms:serialize(instance('result-instance'),'text')" >>>>>> mediatype="text/html" /> >>>>>> This line display all the content, but without any table structure or >>>>>> any other layouts. Except the embedded-html - that content is now >>>>>> displayed correct, but in this case useless, because the hole page >>>>>> has >>>>>> no ,ayout anymore :-( >>>>>> >>>>>> >>>>>> And both option do NOT leave the xforms-control intact, but wipe them >>>>>> away - so my transforming and including of all xform-controls is >>>>>> useless >>>>>> unless i don't get them into my new page so that the will work :-(( >>>>>> But >>>>>> i need those xform-controls for displaying the embedded html-tags >>>>>> as you >>>>>> said, and also for the triggers, to link some of the data to other >>>>>> documents, that should be loaded when clicking on those links :-( >>>>>> Because of that i asked about the submissions through javascript, >>>>>> cause >>>>>> i think <a>-tags will work so far. Of course i would prefer >>>>>> <xform-trigger> now, after you gave me more information on that, >>>>>> but for >>>>>> that, i need those xform-controls to work that where insert by my >>>>>> stylesheet through the xslt-process. >>>>>> >>>>>> I hope that makes my problem more clear, i don't know what i else can >>>>>> do, i'm lost. >>>>>> The aim seems to be so near, while all i need is inside that >>>>>> result-instance you see - but i could not get it INTO my >>>>>> blank.xhtml so >>>>>> that the xform-control will work. >>>>>> >>>>>> In my opinion this seems to be straight forward how something like >>>>>> that >>>>>> should work, doesn't it? >>>>>> Query, Transform, Adding XForm-control, Put it into a new page, and >>>>>> tadaaa - A result-page showing exactly the searched data in a good >>>>>> layout with many links on it to get more details information through >>>>>> linked documents... >>>>>> Am i stupid to think it could and should be that easy? :-(( Than >>>>>> forgive >>>>>> me for causing you so much problems :-( >>>>>> >>>>>> Thanks for every help you gave me, >>>>>> Marcus >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Orbeon Forms - Web Forms for the Enterprise Done the Right Way >>>>> http://www.orbeon.com/ >>>>> >>>>> >>>> >>>> >>>> -------------------------------------------------------------------------------- >>>> >>>> >>>> >>>> >>>>> >>>>> -- >>>>> You receive this message as a subscriber of the >>>>> [hidden email] mailing list. >>>>> To unsubscribe: mailto:[hidden email] >>>>> For general help: mailto:[hidden email]?subject=help >>>>> ObjectWeb mailing lists service home page: >>>>> http://www.objectweb.org/wws >>>>> >>> >>> >>> -- >>> Orbeon Forms - Web Forms for the Enterprise Done the Right Way >>> http://www.orbeon.com/ >>> >>> >> >> >> -------------------------------------------------------------------------------- >> >> >> >>> >>> -- >>> You receive this message as a subscriber of the >>> [hidden email] mailing list. >>> To unsubscribe: mailto:[hidden email] >>> For general help: mailto:[hidden email]?subject=help >>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws >>> >> >> > > > -- > Orbeon Forms - Web Forms for the Enterprise Done the Right Way > http://www.orbeon.com/ > -------------------------------------------------------------------------------- > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
In reply to this post by Erik Bruchez
Hi,
one other question. Searching ones more in the net about embedded html and xml brought up the following code should work with saxon as well: <xsl:copy-of select="node()" disable-output-escaping="yes" /> But that one doesn't work either, even i found more threads that say, this is the most common way to display embedded html out from xml besides the first solution i send some minutes ago. Ryan tries to help me as well, perhaps he will find a another solution. I hope so very much! But i don't know how to handle that error message :-( Thanks and have a nice day :-) -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
In reply to this post by Marcus-2
Marcus,
On 5/25/07, Marcus <[hidden email]> wrote: > And now i tried to insert your statement: > <xforms:output mediatype="text/html"> > <xsl:attribute name="value"> > <xsl:value-of select="(string-join(node(),''))" /> > </xsl:attribute> > </xforms:output> The "value" attribute you generate should contain an XPath expression. Are you sure that <xsl:value-of select="(string-join(node(),''))" /> returns a valid XPath expression? If it just returns a string, you need to put quotes around it. Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
In reply to this post by Marcus-2
Marcus,
Are the enclosed quotes two single quote marks: ' are are they a double quote: " <xsl:value-of select="(string-join(node(),''))" /> Although we would expect that if they were double quotes the page could not be parsed, in practice I have seen small errors confuse the parser, or at least that the parser reports a confusing error. --Hank ----- Original Message ----- From: "Marcus" <[hidden email]> To: <[hidden email]> Sent: Thursday, May 24, 2007 8:20 PM Subject: Re: [ops-users] Display HTML-Tags right? > Hi Erik, > > so here is a new question based on your example you send me! > As i said, i need to do this with xsl, and at the moment i am so far that i > can transform my results to an xhtml-page with xform-controls on it and what > i tested so far is a normal xforms:output that worked, what mean it is > transformed to a normal span-tag. So the first step seems to be done! > > <xforms:output model="resources-model" value=" 'embedded html' "/> > This one works! > > And now i tried to insert your statement: > <xforms:output mediatype="text/html"> > <xsl:attribute name="value"> > <xsl:value-of select="(string-join(node(),''))" /> > </xsl:attribute> > </xforms:output> > That should work to, while yours does as well on your erik-xhtml page, but > it causees this error: > > XPath syntax error at char 45 on line 2 in {... Test <strong>Test}: expected > ")", found ">" > > So, i tried different versions, but got none to work :-( > Perhaps that helps and you've got another idea from now on? > > Thanks, Marcus > > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |