Hi Victor,
That is a tough one, in one case you want some of the data in the field
converted to HTML but other cases (ie the embedded HTML) left as literal
text.
I can't think of any easy way around that, is there too much data to convert
it all to HTML, ie including the italics and line feeds etc, to save in the
DP field, so the field only contains the final HTML marked up data and not
DP formatted data?
Another way might be to use the data as XML data, and add a namespace to the
link <a> element, eg <html:a href="qweqwe">text</html:a> and then use an
XSLT transformation to convert back the entities
Regards
Brian
_____
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Victor Warner
Sent: Wednesday, 15 October 2008 9:35 PM
To: Dataperfect Users Discussion Group
Subject: Re: [Dataperf] ;;W query
Brian,
Thank you for the response.
"Do you have DP Alphanumeric fields which not only contain HTML formatting,
but also include DP formatting, eg lines feeds, bold underline etc?"
Yes
"Do you have a sample of the data value that is contained in the field, and
how you would like it outputted?"
This is as the data is entered into the Alphanumeric field (and the word
"Purpose" would show as underline):
"Purpose: This site provides an useful oversite as to what is harassment in
housing/accommodation sitatuions (eg landlord and tenant).
Also there is a <a href=
<http://england.shelter.org.uk/get_advice/advice_topics/eviction/harassment_
and_illegal_eviction/practical_steps>
"http://england.shelter.org.uk/get_advice/advice_topics/eviction/harassment_
and_illegal_eviction/practical_steps" target="_blank">page</a> which
provides useful information the practical steps a person facing harassment
can take. Also <a href=
<http://england.shelter.org.uk/get_advice/advice_topics/eviction/harassment_
and_illegal_eviction/what_counts_as_harassment>
"http://england.shelter.org.uk/get_advice/advice_topics/eviction/harassment_
and_illegal_eviction/what_counts_as_harassment" target="_blank">this
page</a> provides a list of activities in a housing situation which can
amount to harassment. There is also information on how to "deal" with
harassment."
And this is how I would like this outputted (using ;;W or some other method)
<i>Purpose</i>: This site provides an useful oversite as to what is
harassment in housing/accommodation sitatuions (eg landlord and tenant).
<br />
<br />
Also there is a <a href=
<http://england.shelter.org.uk/get_advice/advice_topics/eviction/harassment_
and_illegal_eviction/practical_steps>
"http://england.shelter.org.uk/get_advice/advice_topics/eviction/harassment_
and_illegal_eviction/practical_steps" target="_blank">page</a>
which provides useful information the practical steps a person facing
harassment can take. Also <a href=
<http://england.shelter.org.uk/get_advice/advice_topics/eviction/harassment_
and_illegal_eviction/what_counts_as_harassment>
"http://england.shelter.org.uk/get_advice/advice_topics/eviction/harassment_
and_illegal_eviction/what_counts_as_harassment" target="_blank">this
page</a>
provides a list of activities in a housing situation which can amount to
harassment. There is also information on how to "deal" with
harassment. <br />
<br />
Victor
Brian Hancock wrote:
Hi Victor,
Do you have DP Alphanumeric fields which not only contain HTML formatting,
but also include DP formatting, eg lines feeds, bold underline etc?
If it is just HTML code in the field, and you are outputting the field for
its HTML to be rendered in say a browser, then there is no need to use the
;;W. If you output without the ;;W then the field would be output as is.
Do you have a sample of the data value that is contained in the field, and
how you would like it outputted?
Regards
Brian
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Victor Warner
Sent: Wednesday, 15 October 2008 7:25 PM
To: Dataperfect Users Discussion Group
Subject: Re: [Dataperf] ;;W query
Brian,
Thank you for the very informative and detailed reply. For the field
concerned there is a range of characters/formatting, which I would like
converted using ;;w (bold/italic, quotes, ampersands).
I wish to create very simple (and only) (x)html pages (certainly not xml
pages).
The bottom line appears that if I wish to use ;;w on field then I
cannot specify or retain any "convertable" characters as is.
Thank you again for the explanation.
Victor
Brian Hancock wrote:
Hi Victor,
That is by design. The five special XML/HTML characters that DP2.6Y
converts
are < > " ' &. These bare characters must not be used inside an attribute
(eg the 'href' attribute of the anchor '<a>' element) or as other unparsed
data in well formed XML or XHTML.
If you have a complete HTML or XML element in a field then you should not
need to use the ;;W indicator to populate a page.
It becomes somewhat complex when you are using HTML fragments as data
inside
an XML document when the fragment may not be well formed XML, because
using
it without the ;;W would cause the XML document to no longer be well
formed
as would create errors in the XML application (Browser etc) In this case
depending on the circumstance you can include the raw data inside a CDATA
section such as
<MYHTML>
<![CDATA[<a href="blah">xxx<a/>]]>
</MYHTML>
In this case leaving off the ;;W would generally give you what is required
even if the HTML fragement is not well formed XML.
Ideally you would try to make sure that HTML fragments are XHTML.
If you are using XSLT the special characters in a CDATA section will
likely
still convert to things like " so on some XSLT processors you can
control this with disable-output-escaping attrbitue in the xsl instruction
eg <xsl:value-of select="." disable-output-escaping="yes" />. However this
does not work with Firefox browsers. So in this case it is better to make
sure that the data is well formed XHTML, or use a different server-side
XSLT
processor.
DP2.6Y improves the XHTML compliance by ensuring that alphanumeric fields
when used with the ;;W indicator output well formed XHTML. In DP2.6X,
bolded
and underlined DP data is converted to uppercase <B> or <U> tags and in
2.6Y
they are lowercase <b>, <i>, <u> in 2.6X line breaks are output as <BR>
but
in 2.6Y they become <br /> where you have overlapped bolded and
underlined
DP text, the ;;W does not correct the nesting, so it can still break XML.
The ;;W indicator also does not work in the apply.format[] function. It
would be very nice if it did, as you could get much better control. I
asked
Lew about it and he said it was quite difficult, so it was left for a
future
day.
Regards
Brian
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Victor Warner
Sent: Wednesday, 15 October 2008 1:07 AM
To: 'Dataperfect Users Discussion Group'
Subject: [Dataperf] ;;W query
I am beginning to understand (somewhat) how the ;;W print mode indicator
works, however there is one thing I would like some clarification:
If within a Alphanumeric field I would like to create a <a href="
">xxx</a> link, and I put this link code in the '"' gets turned to
'"' and the '<' and '>' also get changed.
Is it possible to specify these type of characters so that they do not
get converted for html use but retain the benefit of using ;;W for all
the other things which I wish to be converted?
Victor Warner.
_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/mailman/listinfo/dataperf
_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/mailman/listinfo/dataperf
_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/mailman/listinfo/dataperf
_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/mailman/listinfo/dataperf
------------------------------------------------------------------------
_______________________________________________
Dataperf mailing list
[email protected]
http://lists.dataperfect.nl/mailman/listinfo/dataperf