Display HTML-Tags right?

classic Classic list List threaded Threaded
35 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Display HTML-Tags right?

Marcus-2
Hi,
 
I used the wysiswyg-editor for entering data into my xml-files and i need them for special formatting in singel flieds.
My Problem now is to get those formats display when browsing the documents.
I load the document through a XPL and transform it with a stylesheet, so i could display my data inside a table, but all formats entered with the editor are displayed as plain-text. Viewing the source-code of the page, the tags are displayed i.e. as "<strong>" so the browser won't deal with them as normal html-tags :-((
 
What can i do to display those formats as html-tags? Another stylesheet? Enter some special encoding?
 
Thanks for help,
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
Reply | Threaded
Open this post in threaded view
|

Re: Display HTML-Tags right?

Erik Bruchez
Administrator
Marcus,

One solution is to use XForms and use:

<xforms:output mediatype="text/html" .../>

Marcus wrote:

> Hi,
>  
> I used the wysiswyg-editor for entering data into my xml-files and i
> need them for special formatting in singel flieds.
> My Problem now is to get those formats display when browsing the documents.
> I load the document through a XPL and transform it with a stylesheet, so
> i could display my data inside a table, but all formats entered with the
> editor are displayed as plain-text. Viewing the source-code of the page,
> the tags are displayed i.e. as "&lt;strong&gt;" so the browser won't
> deal with them as normal html-tags :-((
>  
> What can i do to display those formats as html-tags? Another stylesheet?
> Enter some special encoding?
>  
> Thanks for help,
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Display HTML-Tags right?

Marcus-2
Hi Erik,

i'm working on it, to display the result inside the original page, but i was
not succesful until now. At the moment the result is displayed in a new
window as selfbeing html-page and for that does not go through the
xforms-processor :-(
Is there a way to bin a xform-processor into the pipeline to tranform that
xforms:output before the page goes to the browser?

Other possibilities?
Thanks, Marcus

----- Original Message -----
From: "Erik Bruchez" <[hidden email]>
To: <[hidden email]>
Sent: Wednesday, May 16, 2007 12:01 AM
Subject: Re: [ops-users] Display HTML-Tags right?


> Marcus,
>
> One solution is to use XForms and use:
>
> <xforms:output mediatype="text/html" .../>
>
> Marcus wrote:
>> Hi,
>>
>> I used the wysiswyg-editor for entering data into my xml-files and i
>> need them for special formatting in singel flieds.
>> My Problem now is to get those formats display when browsing the
>> documents.
>> I load the document through a XPL and transform it with a stylesheet, so
>> i could display my data inside a table, but all formats entered with the
>> editor are displayed as plain-text. Viewing the source-code of the page,
>> the tags are displayed i.e. as "&lt;strong&gt;" so the browser won't
>> deal with them as normal html-tags :-((
>>
>> What can i do to display those formats as html-tags? Another stylesheet?
>> Enter some special encoding?
>>
>> Thanks for help,
>> 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
Reply | Threaded
Open this post in threaded view
|

Re: Display HTML-Tags right?

Erik Bruchez
Administrator
Marcus,

Not really. Better just use a plain XForms page.

Or, if you want to use XSLT, then try the saxon:parse() function:

   http://www.saxonica.com/documentation/extensions/functions/parse.html

This will work if you have XHTML, but not if you have plain HTML.

-Erik

Marcus wrote:

> Hi Erik,
>
> i'm working on it, to display the result inside the original page, but i
> was not succesful until now. At the moment the result is displayed in a
> new window as selfbeing html-page and for that does not go through the
> xforms-processor :-(
> Is there a way to bin a xform-processor into the pipeline to tranform
> that xforms:output before the page goes to the browser?
>
> Other possibilities?
> Thanks, Marcus
>
> ----- Original Message ----- From: "Erik Bruchez" <[hidden email]>
> To: <[hidden email]>
> Sent: Wednesday, May 16, 2007 12:01 AM
> Subject: Re: [ops-users] Display HTML-Tags right?
>
>
>> Marcus,
>>
>> One solution is to use XForms and use:
>>
>> <xforms:output mediatype="text/html" .../>
>>
>> Marcus wrote:
>>> Hi,
>>>
>>> I used the wysiswyg-editor for entering data into my xml-files and i
>>> need them for special formatting in singel flieds.
>>> My Problem now is to get those formats display when browsing the
>>> documents.
>>> I load the document through a XPL and transform it with a stylesheet, so
>>> i could display my data inside a table, but all formats entered with the
>>> editor are displayed as plain-text. Viewing the source-code of the page,
>>> the tags are displayed i.e. as "&lt;strong&gt;" so the browser won't
>>> deal with them as normal html-tags :-((
>>>
>>> What can i do to display those formats as html-tags? Another stylesheet?
>>> Enter some special encoding?
>>>
>>> Thanks for help,
>>> 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
Reply | Threaded
Open this post in threaded view
|

Re: Display HTML-Tags right?

Marcus-2
Hmm,
a plain xforms page seems to be the better way...

OK, lets say my xpl returns after transformation a document surounded by a
table-tag, instead of the html/body just like now... How could i display
that content inside a blank.xhtml page?

I tried in the PFC:
   <page id="search01" path-info="/search/service/search_exist"
model="search01.xpl" view="blank.xhtml" default-submission="parameters.xml">
        <setvalue ref="/parameters/search-criteria"
parameter="search-criteria"/>
  </page>

The outpupt of my XPL would be:   <p:output name="data" ref="data"/>
<table>
....
</table>

And 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:xi="http://www.w3.org/2001/XInclude"
xmlns:f="http://orbeon.org/oxf/xml/formatting"
      xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:dmv="http://orbeon.org/oxf/examples/dmv"
      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">
        </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>
                                        <!-- Want to place the result
here! -->
    </body>
</html>

How can i do that? Thats what i tried to figure out, but didn't get to work!
Cause in this case i didn't use an instance and inserting data to it i
think, but have a full html-code just to insert - am i right? Perhaps you
can help me with that?

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
Reply | Threaded
Open this post in threaded view
|

Re: Display HTML-Tags right?

Marcus-2
In reply to this post by Erik Bruchez
Hi Erik,
ok, carefully read the whole part about Pipelines about 3 times i tried the
following, but the results are not as exspected and i don't know why this
doesn't work at all :-((
Here are my last changes, and at least i could establish to cope the results
of my XPL to an instance on the new page, but i can't just display it. What
do i have to do?

As i wrote, i tried the following and that seems to be ok so far:
  <page id="search01" path-info="/search/service/search_exist"
model="search01.xpl" view="blank.xhtml" default-submission="parameters.xml">
        <setvalue ref="/parameters/search-criteria"
parameter="search-criteria"/>
  </page>

The createt content of my XPL during tranformation is still something like
and connected to the <p:output name="data" ref="data"/>
<table><tr><td>
...
</td></tr></table>

My blank.xhtml page is the following:
<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:xi="http://www.w3.org/2001/XInclude"
xmlns:f="http://orbeon.org/oxf/xml/formatting"
      xmlns:xhtml="http://www.w3.org/1999/xhtml"
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">
            <!-- 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 ref="instance('result-instance')"
mediatype="text/html">
                    <xforms:label>Result: </xforms:label>
                </xforms:output>
            </xhtml:p>
        <widget:xforms-instance-inspector
xmlns:widget="http://orbeon.org/oxf/xml/widget"/>
    </body>
</html>

But the page show nothing after "Result:" :-( and the Instance Inspector.
But my results are not displayed :-((
Can you tell me why and how to achieve to display my results?

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
Reply | Threaded
Open this post in threaded view
|

Re: Display HTML-Tags right?

Ryan Puddephatt
Marcus,
    You don't show you XPL here? Could you share it? BTW You can use @debug on p:input and p:output to check if the XML is as you expect (obviously you'll need to setup logging). Just to make sure your parameters.xml does contain

<parameters>
    <search-criteria/>
</parameters>

Ryan

Ryan Puddephatt
Software Engineer
 
Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com

"Measuring programming progress by lines of code is like measuring aircraft building progress by weight." - Bill Gates
"If you lie to the compiler, it will get its revenge." - Henry Spencer
"It's hard enough to find an error in your code when you're looking for it; it's even harder when you've assumed your code is error-free." - Steve McConnell
"If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization." - Gerald Weinberg



Marcus wrote:
Hi Erik,
ok, carefully read the whole part about Pipelines about 3 times i tried the following, but the results are not as exspected and i don't know why this doesn't work at all :-((
Here are my last changes, and at least i could establish to cope the results of my XPL to an instance on the new page, but i can't just display it. What do i have to do?

As i wrote, i tried the following and that seems to be ok so far:
 <page id="search01" path-info="/search/service/search_exist" model="search01.xpl" view="blank.xhtml" default-submission="parameters.xml">
       <setvalue ref="/parameters/search-criteria" parameter="search-criteria"/>
 </page>

The createt content of my XPL during tranformation is still something like and connected to the <p:output name="data" ref="data"/>
<table><tr><td>
...
</td></tr></table>

My blank.xhtml page is the following:
<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:xi="http://www.w3.org/2001/XInclude" xmlns:f="http://orbeon.org/oxf/xml/formatting"
     xmlns:xhtml="http://www.w3.org/1999/xhtml" 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">
           <!-- 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 ref="instance('result-instance')" mediatype="text/html">
                   <xforms:label>Result: </xforms:label>
               </xforms:output>
           </xhtml:p>
       <widget:xforms-instance-inspector xmlns:widget="http://orbeon.org/oxf/xml/widget"/>
   </body>
</html>

But the page show nothing after "Result:" :-( and the Instance Inspector. But my results are not displayed :-((
Can you tell me why and how to achieve to display my results?

Thanks, Marcus


-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: Display HTML-Tags right?

fl.schmitt(ops-users)
In reply to this post by Marcus-2
Marcus schrieb:
>  <xhtml:p>
>      <xforms:output ref="instance('result-instance')"
> mediatype="text/html">
>          <xforms:label>Result: </xforms:label>
>       </xforms:output>
>  </xhtml:p>

> But the page show nothing after "Result:" :-( and the Instance
> Inspector. But my results are not displayed :-((

I remember i had the same problem - the output did refer only to the
"uppermost" element because the ref in XForms has only one element as
target. I'm using:

<xforms:output
        value="xxforms:serialize(text/body/*, 'html')"
        mediatype="text/html" />

Maybe this helps.


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
Reply | Threaded
Open this post in threaded view
|

Re: Display HTML-Tags right?

Marcus-2
In reply to this post by Ryan Puddephatt
Hi Ryan,
the XPL does what it should, it get the search-criteria, puts it to the xquery, queries the exist-db and gives back the results. Than i transform those results with an xsl-sheet and connect those output to the pipeline output.
At least i copied the content with
 
<xi:include href="input:data"/>
 
to an instance, but that seemd not to be the right way, cause i was not able to display thosa data with a xforms:output :-(
Now i copied the data directly to my <body> with
 
<xhtml:p>
    <xi:include href="input:data" />
</xhtml:p>
 
And it finally display my results :-)) BUT one thing is still missing.
I surrounded the fields containing "formatted html" with
 
<xsl:for-each select="Inhalt">
    <xforms:output mediatype="text/html">
        <xsl:apply-templates />
    </xforms:output>
</xsl:for-each>
 
But those fields are empty now, after included to the page and the xforms:output-tag is also missing, just lost in space :-(
Perhaps someone could tell me how to bring those xforms-tags to the page, cause i need them for further submissons, linkings and also die right displaying of the formatted data!
 
And while you where asking, here is my XPL. THE XSL is to big to copy, but i try to attach it :-)
(BTW. Is it possible just to attache those files in future, or is it better to copy the content to the mail just like i did until now?)
 
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"
xmlns:lw-p="http://www.puddzy.com/namespaces/lorna-web/products">
 
<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";
namespace xmldb="http://exist-db.org/xquery/xmldb";
import module namespace t="http://exist-db.org/xquery/text";
namespace demo="http://www.mbeddow.com/demo";
namespace fn="http://www.w3.org/2003/05/xpath-functions";
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>
 
 
<p:processor name="oxf:xslt">
<p:input name="config" href="Layout01.xsl"/>
<p:input name="data" href="#search-result"/>
<p:output name="data" ref="data"/>
</p:processor>
 
</p:config>
 


--
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

Layout01.xsl (65K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Display HTML-Tags right?

Marcus-2
In reply to this post by fl.schmitt(ops-users)
Hi Florian, Hi Ryan,

Thanks for that, but i still have to problem that my xforms-tags are wiped
out.
OK, with Florians solution only the xforms-tags are lost and the content is
still there, but now we are back on the first problem, that i need those
html-tags with special formatting to be displayed and i supose thats only
possibly if the xforms-tags will still be there! And i need them on other
places too, for the linking to other document, creating submissions and
triggers...

Any ideas on that? Why are the xforms-tags lost?
Thanks, Marcus



----- Original Message -----
From: "Florian Schmitt" <[hidden email]>
To: <[hidden email]>
Sent: Wednesday, May 16, 2007 12:16 PM
Subject: Re: [ops-users] Display HTML-Tags right?


> Marcus schrieb:
>>  <xhtml:p>
>>      <xforms:output ref="instance('result-instance')"
>> mediatype="text/html">
>>          <xforms:label>Result: </xforms:label>
>>       </xforms:output>
>>  </xhtml:p>
>
>> But the page show nothing after "Result:" :-( and the Instance
>> Inspector. But my results are not displayed :-((
>
> I remember i had the same problem - the output did refer only to the
> "uppermost" element because the ref in XForms has only one element as
> target. I'm using:
>
> <xforms:output
> value="xxforms:serialize(text/body/*, 'html')"
> mediatype="text/html" />
>
> Maybe this helps.
>
>
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Display HTML-Tags right?

Ryan Puddephatt
Marcus,
    The xforms output is a mediatype text/html, not xforms I'm afraid! I don't think there is an easy way to do that

Ryan

Ryan Puddephatt
Software Engineer
 
Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com

"Measuring programming progress by lines of code is like measuring aircraft building progress by weight." - Bill Gates
"If you lie to the compiler, it will get its revenge." - Henry Spencer
"It's hard enough to find an error in your code when you're looking for it; it's even harder when you've assumed your code is error-free." - Steve McConnell
"If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization." - Gerald Weinberg



Marcus wrote:
Hi Florian, Hi Ryan,

Thanks for that, but i still have to problem that my xforms-tags are wiped out.
OK, with Florians solution only the xforms-tags are lost and the content is still there, but now we are back on the first problem, that i need those html-tags with special formatting to be displayed and i supose thats only possibly if the xforms-tags will still be there! And i need them on other places too, for the linking to other document, creating submissions and triggers...

Any ideas on that? Why are the xforms-tags lost?
Thanks, Marcus



----- Original Message ----- From: "Florian Schmitt" [hidden email]
To: [hidden email]
Sent: Wednesday, May 16, 2007 12:16 PM
Subject: Re: [ops-users] Display HTML-Tags right?


Marcus schrieb:
 <xhtml:p>
     <xforms:output ref="instance('result-instance')"
mediatype="text/html">
         <xforms:label>Result: </xforms:label>
      </xforms:output>
 </xhtml:p>

But the page show nothing after "Result:" :-( and the Instance
Inspector. But my results are not displayed :-((

I remember i had the same problem - the output did refer only to the
"uppermost" element because the ref in XForms has only one element as
target. I'm using:

<xforms:output
value="xxforms:serialize(text/body/*, 'html')"
mediatype="text/html" />

Maybe this helps.


florian






--------------------------------------------------------------------------------



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
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: [hidden email] For general help: [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: Display HTML-Tags right?

Marcus-2

Hmm,
but than i've got a big problem and don't know any other solution how i can solve this :-(
OK, lets bring it all together.
 
* I need the XPL to build the exist-db and getting my results.
* I use the same XPL to tranform my results with an XSL-Sheet, to build a big table for displaying all data and including xforms-controls for further functions
* I need a possibility to include that output:data of the XPL to my new result page blank.xhtml
 
Than i build an instance, and include my results there:
<xforms:instance id="result-instance">
    <xi:include href="input:data"/>
</xforms:instance>
 
Using the instance inspector i could see, that my xforms-control are still there!!! So far so good.
 
OK, Than i tried a few way of displaying the data:
 
A)
<xhtml:p>
    <xi:include href="input:data"/>
</xhtml:p><hr/>
 
B)
<xhtml:p>
<xforms:output value="xxforms:serialize(instance('result-instance')/*,'html')" mediatype="text/html" />
</xhtml:p><hr/>
 
C)
<xhtml:p>
<xforms:output value="xxforms:serialize(instance('result-instance')/*,'text')" mediatype="text/html" />
</xhtml:p><hr/>
 
When directly including the data to my page (A), the xforms-controls and also the content of them is lost. All other information are display as a table. So this, seems not to work, while i lose the important xforms-data and -content :-((
When displaying the instance with an xforms:output the information is displayed in different ways (B) all Datas are included, also the content of my xforms-control, but the xforms-control itself is lost! In Version (C) all "normal" html-tags are lost, also the xforms-control, and the data is displayed as plaintext, except the content of the xforms-control, which is now display with the saved html-formating...
 
Than i thought i could try something like:
 
<xsl:variable name="result" select="xxforms:serialize(instance('result-instance'),'html')" as="document-node()"/>
<xsl:copy>
    <xsl:copy-of select="$result" />
</xsl:copy>
 
But i think i was very stupid just to think it could be so easy :-((
 
 
I realy need an urgend soltuion to solve this problem and getting ALL data with ALL html-formats to be displayed :-(
Another way might be just query the database and get back the instance into my model and than connecting the data line for line by hand - but that couldn't be the right way to do something like that, or should it be thus complicated? And for what are XSL Sheet useful, if a can't make there another a new xforms page, which will be displayed with the epilogue and so on....
 
I have no other ideas but i need this to work.
 
Are there other solutions of getting those results display on an own page, with working xforms-controls and connected to the epilogue and so on? That would be a great help!!!!
 
Thanks, Marcus
 
 
 
 
----- Original Message -----
Sent: Wednesday, May 16, 2007 1:14 PM
Subject: Re: [ops-users] Display HTML-Tags right?

Marcus,
    The xforms output is a mediatype text/html, not xforms I'm afraid! I don't think there is an easy way to do that

Ryan

Ryan Puddephatt
Software Engineer
 
Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com

"Measuring programming progress by lines of code is like measuring aircraft building progress by weight." - Bill Gates
"If you lie to the compiler, it will get its revenge." - Henry Spencer
"It's hard enough to find an error in your code when you're looking for it; it's even harder when you've assumed your code is error-free." - Steve McConnell
"If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization." - Gerald Weinberg



Marcus wrote:
Hi Florian, Hi Ryan,

Thanks for that, but i still have to problem that my xforms-tags are wiped out.
OK, with Florians solution only the xforms-tags are lost and the content is still there, but now we are back on the first problem, that i need those html-tags with special formatting to be displayed and i supose thats only possibly if the xforms-tags will still be there! And i need them on other places too, for the linking to other document, creating submissions and triggers...

Any ideas on that? Why are the xforms-tags lost?
Thanks, Marcus



----- Original Message ----- From: "Florian Schmitt" [hidden email]
To: [hidden email]
Sent: Wednesday, May 16, 2007 12:16 PM
Subject: Re: [ops-users] Display HTML-Tags right?


Marcus schrieb:
 <xhtml:p>
     <xforms:output ref="instance('result-instance')"
mediatype="text/html">
         <xforms:label>Result: </xforms:label>
      </xforms:output>
 </xhtml:p>

But the page show nothing after "Result:" :-( and the Instance
Inspector. But my results are not displayed :-((

I remember i had the same problem - the output did refer only to the
"uppermost" element because the ref in XForms has only one element as
target. I'm using:

<xforms:output
value="xxforms:serialize(text/body/*, 'html')"
mediatype="text/html" />

Maybe this helps.


florian






--------------------------------------------------------------------------------



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
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: [hidden email] For general help: [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: Display HTML-Tags right?

fl.schmitt(ops-users)
Hi Marcus,

Marcus schrieb:

 > * I need the XPL to build the exist-db and getting my results.
 > * I use the same XPL to tranform my results with an XSL-Sheet, to build
 > a big table for displaying all data and including xforms-controls for
 > further functions

I think this is the step that should be replaced by a better one:

 > Another way might be just query the database and get back the instance
 > into my model and than connecting the data line for line by hand - but
 > that couldn't be the right way to do something like that, or should it
 > be thus complicated?

I don't know how your data is structured, but building a XForm and
binding it to the data model shouldn't be more complicated than building
a page with a XSL Stylesheet based on the same data. Could you post an
example for a Query result that should get transformed?


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
Reply | Threaded
Open this post in threaded view
|

Re: Display HTML-Tags right?

fl.schmitt(ops-users)
In reply to this post by Marcus-2
Marcus schrieb:

 > * I need a possibility to include that output:data
> of the XPL to my new result page blank.xhtml

Another suggestion: In the 3.0.2 Version of OPS, the "ATM Page Flow"
example included a XSL-based XForms view.

The Page Flow entry is:

<page id="view-account" path-info="/atm/atm-view-account"
xforms="view-account-form.xml"
             model="view-account-get-balance.xpl"
view="view-account-view.xsl">
         (...)
     </page>

The view-account-view.xsl is:

<xhtml:html xsl:version="2.0"
             xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
             xmlns:f="http://orbeon.org/oxf/xml/formatting"
             xmlns:xhtml="http://www.w3.org/1999/xhtml"
             xmlns:xforms="http://www.w3.org/2002/xforms">
     <xhtml:head>
         <xhtml:title>View Account</xhtml:title>
     </xhtml:head>
     <xhtml:body>
         <xforms:group>
             <xhtml:p>
                 <xsl:text>The current balance is: </xsl:text>
                 <xsl:value-of select="/balance"/>
             </xhtml:p>
             <xhtml:p>
                 <xforms:input ref="/amount"/>
                 <xforms:submit>
                     <xforms:label>Withdraw</xforms:label>
                 </xforms:submit>
             </xhtml:p>
             <xhtml:p style="margin-top: 3em">
                 <xhtml:a href="/atm">Back</xhtml:a> to ATM home<br/>
             </xhtml:p>
         </xforms:group>
     </xhtml:body>
</xhtml:html>

So one doesn't need to put an XSLT Processor into the pipeline. And i
suppose one could put the XForms model (xforms="view-account-form.xml")
into the XSL file (maybe one has to if using 3.5.x).

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
Reply | Threaded
Open this post in threaded view
|

Re: Display HTML-Tags right?

Marcus-2
In reply to this post by fl.schmitt(ops-users)
Hi,
i'm very sorry to say, that working with styleshhets should be the preferd
way within this project.
Here is one search-result you asked for but ireached your second mail too
and will try that solution too
I'll give you replay when i have new results to share...

Thanks, Marcus


Search-Result:
--------------

<result>
     <term>'test'</term>
     <item>
        <form>
             <Datensatz>
               <ID>1</ID>
               <ASig>
                   <ASTitel>asd</ASTitel>
                   <MBK>
                        <KatEintrag>
                            <KatID/>
                            <Inhalt>
                                <exist:match>Test</exist:match><strong><exist:match>Test</exist:match></strong>
<em><exist:match>Test</exist:match><br /></em><div
align="center"><exist:match>Test</exist:match><br /><div
align="left">x<sub>2<sup>4</sup></sub><sup>3</sup><sup>3</sup><br
/><ul><li>1</li><li>2</li><li>3</li></ul><font color="#ff0000">Rot<br
/></font></div></div>
                            </Inhalt>
                            <Referenz/>
                            <Apparat/>
                        </KatEintrag>
                    </MBK>
...
                     <LK1a>
                        <LektEintrag>
                            <KatID/>
                             <Zeit>
                                <AltBez/>
                                <NeuBez/>
                                <SynBez/>
                                <Datum/>
                            </Zeit>
                            <Inhalt/>
                            <Referenz/>
                            <Apparat/>
                        </LektEintrag>
                    </LK1a>
...
                   <InhCod>
                        <KatEintrag>
                            <KatID/>
                            <Inhalt/>
                            <Referenz/>
                            <Apparat/>
                        </KatEintrag>
                    </InhCod>
                    <Bemerkungen/>
                </ASig>
                <NSig>
                     <Heute>
                        <Ort/>
                        <Bib/>
                        <NSTitel/>
                    </Heute>
                    <HsBeschr>
                        <Quellen/>
                        <Links/>
                    </HsBeschr>
                    <DigiHs/>
                    <Ident/>
                     <Datierung>
                        <Jh1/>
                        <Jh2/>
                        <Jahr/>
                    </Datierung>
                    <Provenienz/>
                    <Besitz/>
                    <Schreiber/>
                    <Incipit>
                        <IncipitTitel/>
                        <IncipitText/>
                        <ExplicitText/>
                    </Incipit>
                    <Edition/>
                    <Literatur/>
                    <Bemerkungen/>
                </NSig>
                <Intern>
                     <Schritte/>
                     <LastChange>2007-04-12+02:00</LastChange>
                     <Name/>
                     <Bemerkungen/>
                     <Status>
                        <exist:match>Test</exist:match>
                     </Status>
                </Intern>
            </Datensatz>
        </form>
    </item>
</result>




--
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
Reply | Threaded
Open this post in threaded view
|

Re: Display HTML-Tags right?

Marcus-2
In reply to this post by fl.schmitt(ops-users)
Hi,
so, i tried to figure out how that "old" example works, but i don't think it
fits my needs, because, as i said, i need to work with stylesheets!
I tried to build the page at ones in my stylesheet, but than i have the
problem, that i won't build connected to the xforms-Processor  or somethink
like that!? Beacuse my templates in the epilogue and also the widgets, the
menu and all that stuff were not been attached :-((

Guys, i can't believe that there is no way to easy display those stupid data
:-((

Query the exist-db, recieving data that were stored through OF, including
html-formatting also based on the wysiwyg-editor with OF, transforming those
results with a stylesheet to add tables and more xforms-controls with OF XPL
and than not be able to display those data correct inside the webapp
together with the themes added through the epilogue and full functionality
of the xform-controls?

There must be a simple solution! What will all the stuff be worth when it is
such a big problem of bring the information out of the XPL into a new
result-page and then proceed through the xforms-processor so that this
dynamic produced page would work, just as if the page was loaded from the
server? :-(( Why isn't that possible?

I become desperate after tying for 2 days to get this to work, and the aim
seems to be soooooooo near, but unreachable :-(




--
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
Reply | Threaded
Open this post in threaded view
|

Re: Display HTML-Tags right?

Ryan Puddephatt
Marcus
Hi,
so, i tried to figure out how that "old" example works, but i don't think it fits my needs, because, as i said, i need to work with stylesheets!
I tried to build the page at ones in my stylesheet, but than i have the problem, that i won't build connected to the xforms-Processor  or somethink like that!? Beacuse my templates in the epilogue and also the widgets, the menu and all that stuff were not been attached :-((
If you used a xforms:submission/@replace="all" then the output of you search.xpl could be used to create a whole new page, would that be acceptable

Guys, i can't believe that there is no way to easy display those stupid data :-((
I think your asking alot of the engine to dynamically introduce new dependancies and controls!!!

Query the exist-db, recieving data that were stored through OF, including html-formatting also based on the wysiwyg-editor with OF, transforming those results with a stylesheet to add tables and more xforms-controls with OF XPL and than not be able to display those data correct inside the webapp together with the themes added through the epilogue and full functionality of the xform-controls?

There must be a simple solution! What will all the stuff be worth when it is such a big problem of bring the information out of the XPL into a new result-page and then proceed through the xforms-processor so that this dynamic produced page would work, just as if the page was loaded from the server? :-(( Why isn't that possible?

I become desperate after tying for 2 days to get this to work, and the aim seems to be soooooooo near, but unreachable :-(

You just need to look for another simpler angle

HTH

Ryan



-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: Display HTML-Tags right?

Erik Bruchez
Administrator
In reply to this post by Marcus-2
Marcus wrote:

> Hi,
> so, i tried to figure out how that "old" example works, but i don't
> think it fits my needs, because, as i said, i need to work with
> stylesheets!
> I tried to build the page at ones in my stylesheet, but than i have the
> problem, that i won't build connected to the xforms-Processor  or
> somethink like that!? Beacuse my templates in the epilogue and also the
> widgets, the menu and all that stuff were not been attached :-((
>
> Guys, i can't believe that there is no way to easy display those stupid
> data :-((
>
> Query the exist-db, recieving data that were stored through OF,
> including html-formatting also based on the wysiwyg-editor with OF,
> transforming those results with a stylesheet to add tables and more
> xforms-controls with OF XPL and than not be able to display those data
> correct inside the webapp together with the themes added through the
> epilogue and full functionality of the xform-controls?
>
> There must be a simple solution! What will all the stuff be worth when
> it is such a big problem of bring the information out of the XPL into a
> new result-page and then proceed through the xforms-processor so that
> this dynamic produced page would work, just as if the page was loaded
> from the server? :-(( Why isn't that possible?
>
> I become desperate after tying for 2 days to get this to work, and the
> aim seems to be soooooooo near, but unreachable :-(
In short you say you need an XSLT stylesheet to be able to parse an
embedded HTML fragment.

If saxon:parse() doesn't work for you, then I don't think you can do it
in XSLT alone. You have to convert the HTML into something else, XHTML
probably, before being able to output it.

Really the easiest way of doing it here is to use XForms and
xforms:output with mediatype="text/html".

-Erik

--
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
Reply | Threaded
Open this post in threaded view
|

Re: Display HTML-Tags right?

Marcus-2
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





--
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
Reply | Threaded
Open this post in threaded view
|

Re: Display HTML-Tags right?

Marcus-2
In reply to this post by Ryan Puddephatt

Hi Ryan,
 
>If you used a xforms:submission/@replace="all" then the output of you search.xpl could be used to create a whole new page, would that be acceptable
I used the  xforms:submission/@replace="all"
 
>I think your asking alot of the engine to dynamically introduce new dependancies and controls!!!
Because of that i tried to transform my results via XSTL inside the pipeline and add there all the xform-controls i need, so when building the new page, blank.xhtml and "including" that results before the will be displayed at the browser, i thought the engine doesn't has to do something dynamically after buildet the page. Am i wrong to think that way?
I thought the page is build up, the blank.xhtml together with the xpl, and after copied all together, just after that all happend, than the xforms-engine is doing the rest by transform that page and then sending it to the browser!? Incorrect?
 
 
>You just need to look for another simpler angle
 
Thanks for that advise, but i thought this is the simpliest way of build new pages, by querying, transforming, proceeding and than send back to the browser. Can't think of a more simpler solution :-((

 
Regards,
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
12