NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: [thredds] XHTML in documentation element

  • To: Christian Ward-Garrison <cwardgar@xxxxxxxx>
  • Subject: Re: [thredds] XHTML in documentation element
  • From: Egil Støren <egils@xxxxxx>
  • Date: Thu, 12 Apr 2018 11:51:20 +0200
OK. I have to find some other solution. Thanks anyway for the clarification .

   Egil

On Wed, Apr 11, 2018 at 10:45 PM, Christian Ward-Garrison <cwardgar@xxxxxxxx
> wrote:

> Sean's right, XHTML isn't supported at all. In fact, I just learned that
> our XML parser discards all tags within the documentation element. So,
>
>     <documentation>
>       This <i>is</i> <b>some</b> text!
>     </documentation>
>
> Is rendered as: "This text!".
>
> We should update the docs to remove mention of the XHTML capability.
>
> - Christian
>
> On Wed, Apr 11, 2018 at 11:05 AM, Sean Arms <sarms@xxxxxxxx> wrote:
>
>> So, in 4.6 we have:
>>
>> // * TODO: XHTML
>>
>> (https://github.com/Unidata/thredds/blob/master/cdm/src/main
>> /java/thredds/catalog/InvDocumentation.java#L45)
>>
>> and in 5.0, xhtml is not even mentioned:
>>
>> https://github.com/Unidata/thredds/blob/5.0.0/cdm/src/main/
>> java/thredds/client/catalog/Documentation.java
>>
>> So, while xhtml should be supported, it does not look like it
>> currently is supported :-(
>>
>> On Wed, Apr 11, 2018 at 5:15 AM, Egil Støren <egils@xxxxxx> wrote:
>> > Thanks,
>> >
>> > However, your answer did not make me any wiser. You say the XHTML will
>> be
>> > escaped first, which is OK with me, as long as the intended content
>> shows up
>> > in the summary page. I suppose I do not have to do the escaping myself .
>> >
>> > My motivation for using XHTML is to include a table with download links
>> for
>> > each separate file that an aggregated dataset is composed of. Since
>> this is
>> > monthly files covering several years, the alternative method, using
>> > xlink:href and xlink:title attributes inside documentation elements
>> will be
>> > not very user-friendly, as each monthly file will occupy one line for
>> > itself.
>> >
>> > I have created a test XML file with XHTML shown below. The XHTML
>> contains
>> > only a single URL reference just for testing. This will be expanded to a
>> > table when I have a working test file.
>> >
>> > <?xml version="1.0" encoding="UTF-8"?>
>> > <catalog
>> >   name="Aggregated Observations from MET Stations"
>> >   xmlns="http://www.unidata.ucar.edu/namespaces/thredds/InvCatalog/v1.0
>> "
>> >   xmlns:xlink="http://www.w3.org/1999/xlink"; >
>> >   <service name="virtualServices" base="" serviceType="compound">
>> >     <!-- services working with virtual/aggregated files -->
>> >     <service name="thisDODS" serviceType="OpenDAP"
>> base="/thredds/dodsC/" />
>> >     <service name="wms" serviceType="WMS" base="/thredds/wms/" />
>> >     <service name="wcs" serviceType="WCS" base="/thredds/wcs/" desc="web
>> > coverage service"/>
>> >     <service name="subsetServer" serviceType="NetcdfSubset"
>> > base="/thredds/ncss/" />
>> >     <service name="ncml" serviceType="NCML" base="/thredds/ncml/"/>
>> >     <service name="uddc" serviceType="UDDC" base="/thredds/uddc/"/>
>> >     <service name="iso" serviceType="ISO" base="/thredds/iso/"/>
>> >   </service>
>> >   <dataset name="Aggregated MET Observations from Station SN99710"
>> > ID="aggregated_observations/stations/SN99710"
>> > urlPath="aggregated_observations/stations/SN99710">
>> >     <dataType>Grid</dataType>
>> >     <metadata inherited="true">
>> >       <serviceName>virtualServices</serviceName>
>> >     </metadata>
>> >     <documentation xmlns:xhtml="http://www.w3.org/1999/xhtml";>
>> >       <xhtml:a href="https://www.met.no";>Meteorologisk
>> Institutt</xhtml:a>
>> >     </documentation>
>> >     <netcdf xmlns="http://www.unidata.ucar
>> .edu/namespaces/netcdf/ncml-2.2">
>> >       <aggregation dimName="time" type="joinExisting" recheckEvery="1
>> hour">
>> >         <scan
>> > location="/lustre/storeA/project/metproduction/observations/
>> stations/SN99710"
>> > regExp=".*\.nc"/>
>> >       </aggregation>
>> >     </netcdf>
>> >   </dataset>
>> > </catalog>
>> >
>> > This gives a summary page containing the "Documentation" heading, but
>> > without any content beneath. No error messages. I do not work very often
>> > with XML and namespaces, and I may have missed something obvious.
>> >
>> >    Egil
>> >
>> > On Wed, Apr 11, 2018 at 7:50 AM, Christian Ward-Garrison <
>> cwardgar@xxxxxxxx>
>> > wrote:
>> >>
>> >> Hi Egil,
>> >>
>> >> The THREDDS doc is technically correct: you can include arbitrary
>> XHTML in
>> >> a documentation element and it will be displayed in the dataset summary
>> >> page. However, the XHTML will be escaped [1] first, probably to prevent
>> >> users from accidentally breaking the page. Frankly, I'm not sure why
>> you'd
>> >> ever want to include (escaped) XHTML, but there you go.
>> >>
>> >> Cheers,
>> >> Christian
>> >>
>> >> [1] https://stackoverflow.com/questions/7381974
>> >>
>> >> On Tue, Apr 10, 2018 at 5:03 AM, Egil Støren <egils@xxxxxx> wrote:
>> >>>
>> >>> Hi,
>> >>>
>> >>> According to the thredds documentation, the documentation element may
>> >>> contain arbitrary plain text content, or XHTML (see
>> >>> https://www.unidata.ucar.edu/software/thredds/v4.6/tds/catal
>> og/InvCatalogSpec.html#documentation).
>> >>> I have tried xhtml without any success. Can someone provide an
>> example on
>> >>> how this can be done?
>> >>>
>> >>> Best regards,
>> >>>
>> >>>    Egil Støren
>> >>>    MET Norway
>> >>>
>> >>>
>> >>> _______________________________________________
>> >>> NOTE: All exchanges posted to Unidata maintained email lists are
>> >>> recorded in the Unidata inquiry tracking system and made publicly
>> >>> available through the web.  Users who post to any of the lists we
>> >>> maintain are reminded to remove any personal information that they
>> >>> do not want to be made public.
>> >>>
>> >>>
>> >>> thredds mailing list
>> >>> thredds@xxxxxxxxxxxxxxxx
>> >>> For list information or to unsubscribe,  visit:
>> >>> http://www.unidata.ucar.edu/mailing_lists/
>> >>
>> >>
>> >
>> >
>> > _______________________________________________
>> > NOTE: All exchanges posted to Unidata maintained email lists are
>> > recorded in the Unidata inquiry tracking system and made publicly
>> > available through the web.  Users who post to any of the lists we
>> > maintain are reminded to remove any personal information that they
>> > do not want to be made public.
>> >
>> >
>> > thredds mailing list
>> > thredds@xxxxxxxxxxxxxxxx
>> > For list information or to unsubscribe,  visit:
>> > http://www.unidata.ucar.edu/mailing_lists/
>>
>> _______________________________________________
>> NOTE: All exchanges posted to Unidata maintained email lists are
>> recorded in the Unidata inquiry tracking system and made publicly
>> available through the web.  Users who post to any of the lists we
>> maintain are reminded to remove any personal information that they
>> do not want to be made public.
>>
>>
>> thredds mailing list
>> thredds@xxxxxxxxxxxxxxxx
>> For list information or to unsubscribe,  visit:
>> http://www.unidata.ucar.edu/mailing_lists/
>>
>
>
  • 2018 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the thredds archives: