Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

The example below is what needs to be added for each host:port/path combination that the servlet needs to provide credentials for. The param-value is a colon-delimited username and password pair. When the Saxon Servlet needs to access a URL starting with the param-name, it will provide these credentials. Multiple init-param elements may be provided.

Code Block
xml
xml
borderStylesolidxml
<init-param>
  <param-name>credentials for localhost:8080/fedora/getDS</param-name>
  <param-value>backendUser:backendPass</param-value>
</init-param>

...

Panel
titleURL

http://localhost:8080/saxon/SaxonServlet?source=http://dl.lib.virginia.edu/data/xmltext/ead/viu03270&style=http://dl.lib.virginia.edu/bin/ead/xsl/document.xsl&param1=SomeText

Code Block
xml
titleStylesheetxml
borderStylesolid
titlexmlStylesheet
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:param name="param1"/>
  <xsl:template match="/">
    <output>
      <xsl:value-of select="$param1"/>
    </output>
  </xsl:template>
</xsl:stylesheet>

...

Panel
titleURL

http://localhost:8080/saxon/SaxonServlet?source=http://dl.lib.virginia.edu/data/xmltext/ead/viu03270&style=http://dl.lib.virginia.edu/bin/ead/xsl/document.xsl&param1=http://dl.lib.virginia.edu/data/xmltext/another-input

Code Block
xml
titleStylesheetxml
borderStylesolid
titlexmlStylesheet
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:param name="param1"/>
  <xsl:template match="/">
    <output>
      <xsl:value-of select="document($param1)/path/to/element"/>
    </output>
  </xsl:template>
</xsl:stylesheet>

...

By default the Saxon servlet will return a media type of text/html if none has been defined in your stylesheet. If your stylesheet is generating XML you may find it useful to set the media type so the correct type will be returned - for instance to a browser via an object method (disseminator}. To do this include an xsl:output element as a top-level element in your stylesheet, with a media-type attribute defining the media type.

Code Block
xml
xml
borderStylesolid
titleInternet Media Type example
borderStylesolid
xml
<xsl:output indent="yes" method="xml" media-type="text/xml"/>

...