12

I extract metadata from the GDB_UserMetadata SDE table. Now I want to transform that xml to html so that I can view it from my browser. To do that I use the ISO.xsl stylesheet found in C:\Program Files\ArcGIS\Metadata\Stylesheets. I add to the beginning of the file:

<?xml-stylesheet type='text/xsl' href='ISO.xsl'?>

It works fine in IE9 but Firefox says:

Error loading stylesheet: Parsing an XSLT stylesheet failed.

Does anyone know WHY?

5
  • Use <xsl:stylesheet ...> instead of <xsl-stylesheet....>
    – Mapperz
    Commented Mar 30, 2011 at 14:27
  • haven't had this problem. But my first steps would be to clear data in Firefox and specify an absolute path for the stylesheet. What version of firefox are you using?
    – badkins
    Commented Mar 30, 2011 at 14:29
  • Thanks for your answers, if I use "xsl:stylesheet" Firefox complains about a not well-formed issue. If I write the absolute path for the .xsl I get a plain text file. IE9 seems to work with anything though. I am using the FF4 but it I had the same problem with the previous version. Commented Mar 31, 2011 at 12:16
  • Are both your XML and XSLT valid? Try running through w3.org/2005/08/online_xslt
    – Sean
    Commented Mar 31, 2011 at 13:13
  • That validator didn't work for my files but it doesn't seem to work with small xml/xsl files I know are valid. I assumed that ISO.xsl is valid since I took it from the ArcGIS folder in drive C:. If ArcCatalog can transform a xml file I supposed I could do the same from a browser. Commented Apr 1, 2011 at 6:56

1 Answer 1

3

I believe the tool you want is the XSLTransform_conversion tool. This tool is found in ArcToolbox's Coversion tools. Look in Conversion Tools, then open the Metadata toolset. It's called XSLT Transformation. If you execute it in python, it's the arcpy.XSLTransform_conversion() method. You can look it up in ArcGIS Desktop help for a full description. Here's the link to the online help:

http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001200000017000000

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.