[Home] [By Thread] [By Date] [Recent Entries]
Another question is what is your output?
As Wendell points out, if your output is XML, whitespace is usually preserved. But if you're trying to generate HTML from an XML element like: <abstract>
The primary parameters measured in this dataset are:
- temperature
- wind speed
- humidityThe units are: Temperature Wind Speed Humidity
==============================
degrees C km/h percentGlobal Attributes of level 1a datasets are: Mission and Documentation, Data Time, Data Quality, File Metrics, and Scene Coordinates. Vgroups included in the dataset are Scan-Line Attributes, Raw SeaStar Data, Converted Telemetry, Navigation, Sensor Tilt, and Calibration. Of the six Vgroups, four Vgroups, Scan-Line At tributes, Raw SeaStar Data, Converted Telemetry, and Navigation, contain data that are functions of scan lines. <abstract> and your XSLT does: <p><xsl:value-of select="abstract"><p> Any HTML browser would collapse all your significant whitespace, losing the indenting and the table, squishing everything together into an unreadable mess. If you simply used <pre>...</pre> instead, then you'd keep the indenting and table, but the final paragraph would scroll endlessly to the right, rather than wrapping with the window size. If this is your problem, you might consider using our printFormatted.xsl template which tries to guess the intent of the author, and preserve whitespace when it finds consecutive spaces and tabs, but outputs as an ordinary paragraph otherwise: http://www.ngdc.noaa.gov/metadata/published/views/xml2text/xml-to-text-ISO.xsl which imports: http://www.ngdc.noaa.gov/metadata/published/views/xml2text/printFormatted.xsl We've found it to work reasonably well on many different combinations of whitespace. ! or ? --Rich Richard Fozzard, Computer Scientist Geospatial Metadata at NGDC: http://www.ngdc.noaa.gov/metadata Cooperative Institute for Research in Environmental Sciences (CIRES) Univ. Colorado & NOAA National Geophysical Data Center, Enterprise Data Systems 325 S. Broadway, Skaggs 1B-305, Boulder, CO 80305 Office: 303-497-6487, Cell: 303-579-5615, Email: richard.fozzard@xxxxxxxx Wendell Piez said the following on 05/17/2011 09:35 AM: Hi,
|

Cart



