Transforming RTF Boxes/XHTML - InfoPath Dev
in

InfoPath Dev

Transforming RTF Boxes/XHTML

Last post 01-29-2007 06:33 AM by RLPopeIII. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 12-18-2006 09:30 AM

    Transforming RTF Boxes/XHTML

    I have created content in InfoPath Rich Text Format Boxes. I have created an xslt for the XML output (using Altova Style Vision) and while the text is available, all of the formating is stripped out.

    Any suggestions as to how I can keep the formatting?

    Thank you,
  • 12-18-2006 11:20 PM In reply to

    Re: Transforming RTF Boxes/XHTML

    Hi Ren and welcome to our forum,
    Why did you create an XSLT for the XML output? What are you trying to accomplish? Are you trying to store the data in a database or send it to another downstream process? In general, your XSLT will have to be able to treat the XHTML inner tags as one string in order to pass it along without a loss of formatting. Sorry I couldn't be more helpful, but I need to understand what you are doing?
    Thanks!
    Patrick Halstead
    Project Manager at Qdabra
  • 12-19-2006 06:31 AM In reply to

    Re: Transforming RTF Boxes/XHTML

    quote:
    Originally posted by Patrick Halstead

    Why did you create an XSLT for the XML output? What are you trying to accomplish?



    Patrick,

    Thank you for the reply. The out put will be used for three things: to create web based content (x/html), to create word documents in several different formats and provide data for applications (the applications would read directly from the XML document). The RTF elements in the form will probably hold significant amounts of text and will most likely have a good deal of formating. They are the primary source for the web content and documents and the rest of the elements will feed the developed applications.

    quote:
    In general, your XSLT will have to be able to treat the XHTML inner tags as one string in order to pass it along without a loss of formatting.


    In my XSLT proccessor (again, Altova StyleVision) it seems to not even recognize the inner xhtml tags.

    I hope this helps to clarify the issue.


    Thanks,



  • 01-02-2007 09:38 AM In reply to

    Re: Transforming RTF Boxes/XHTML

    The XHTML tags contain standard HTML with the exception that they might have the addition of a namespace. Other than that, you should be able to just copy the contents to the output.
  • 01-02-2007 09:39 AM In reply to

    Re: Transforming RTF Boxes/XHTML

    For more details, please see my tutorial:

    Display Inline Pictures From a Rich Text Field on a Web Page
    http://www.infopathdev.com/howto/tutorials/default.aspx?i=46622d199b5f4042acecc1953b55676a
  • 01-16-2007 01:11 PM In reply to

    Re: Transforming RTF Boxes/XHTML

    quote:
    Originally posted by Greg Collins

    For more details, please see my tutorial:

    Display Inline Pictures From a Rich Text Field on a Web Page
    http://www.infopathdev.com/howto/tutorials/default.aspx?i=46622d199b5f4042acecc1953b55676a



    Greg,

    Sorry it took so long to get back, I started orking on another part of the project.

    It works like a champ. It appears the the Altova WSIWYG XSLT Editor does not support copy-to so I add it after the fact and I get my RTF content.


    Once again, Thank you.
  • 01-16-2007 02:52 PM In reply to

    Re: Transforming RTF Boxes/XHTML

    Great! Glad you got it working!
  • 01-22-2007 12:21 PM In reply to

    Re: Transforming RTF Boxes/XHTML

    quote:
    Originally posted by Greg Collins

    Great! Glad you got it working!



    Greg,

    I have to partially retract my xhtml boxes are working. I am using the copy-of statement in my xsl and it works on the text within the xhtml tag.

    However. . .

    I just applied my xsl to the xml out of the InfoPath form in Word. I noticed that all of the text from that element was not formated. I then noticed that all of the text that was typed into the text box was not enclosed within the element's tags. In some cases, the text was completely outside of the tags. An example:

    <Note>Text Text</Note> Text Text

    or

    <Note></Note> Text Text Text

    Our use case for RTF boxes is users find information on the internet and cut and paste infomration into the rtf control. Sometimes users will cut and paste multiple times into one box.

    It seems that the way that InfoPath implents XHTML is to use a complex type and anything between the parent tag is valid so the form saves without any errors.

    When pasting or adding text at the end of the control, could InfoPath be placing it past the RTF element tag?

    Any thoughts?

    Thanks,
  • 01-29-2007 06:33 AM In reply to

    Re: Transforming RTF Boxes/XHTML

    quote:
    I just applied my xsl to the xml out of the InfoPath form in Word. I noticed that all of the text from that element was not formated. I then noticed that all of the text that was typed into the text box was not enclosed within the element's tags.


    Ok I found out why all of the text was not formatted: I did not remove the apply template elements from the xsl file and it created a duplicate unformatted instance of the text. Now the text displays as intended. However, in Word some of the text of the RTF file is still outside of the element tag.

    Part of me says it works, don't fix it, but it is kind of troubling.
Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.