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