How to definitively know which xsl stylesheet is being applied to the document I'm viewing in a Coba

Let say I'm viewing 101 sct 1 document in WLN. What are the steps that I should follow to find out which xsl file is being applied to the XML retrieved from Novus?

Answers

  • The first place you can look is at the div with an id of "co_document" as it will often have a class applied that describes the content type, though that doesn't necessarily map to a stylesheet. In the source of the page is embedded the document meta info in a hidden input like below. This displays the content type for the document being rendered (subContentType":"Caselaw - NRS","). You can look that content type up in the ContentTypeMapData.xml file in document and that will say which stylesheet was used (
    ).
  • In WLN, you do your search for 101 sct 1 and you are brought right to the document. Note the URL is something like
    https://a.next.westlaw.com/Document/Id4c4761b9c1d11d991d0cc6b54f12d4d/View/FullText.html?transitionType=UniqueDocItem&contextData=(sc.Default)&userEnteredCitation=101+sct+1. The GUID after the /Document/ part of the URL is the Novus GUID. You can then use Easel to look up that document and determine what collection the document is contained within (for more on how to use Easel, see [here](
    http://nsawiki.int.westgroup.com/wiki/index.php5/Easel). Doing this shows that this document is in the collection called
    w_cs_sct1. The only way to definitively know how this is mapped is to ask someone from LEO what stylesheet is mapped to this collection. For a method that will work most of the time, please read on. You can then view the ContentTypeMapData.xml file located at $\Cobalt Document\Development\Document\Document\Provider\ContentMapper to look up that collection. There you yield:
    You have now determined that the
    ContentTypeName="Caselaw - NRS". In the Same file, look for the string
    ContentTypeName="Caselaw - NRS" appearing in a
    ContentType element. That element will have an attribute called
    Stylesheet which contains the name of the XSLT file used to transform documents in this collection (in this case
    Stylesheet="CaselawNRS.xsl"). There are several files called CaselawNRS.xsl within the Document project, but I think the one that is used is located at $\Cobalt Document\Development\WestlawNext\WLNDocument\Xslt\WestlawNext\DefaultProductView\ContentTypes.
  • This doesn't always work as collections are now mapped to content types by LEO and the collections in ContentTypeMapData.xml is only used locally.
  • While I understand that theoretically this is true, typically developers still update this file to be able to develop their code locally before LEO makes their updates (as far as I am aware of anyway). So this should work a majority of the time (I've actually never had a scenario where this
    didn't work).
  • I updated the answer to state that the only definitive way to know is to get the collection and ask LEO (while still providing the information about ContentTypeMapData.xml for a method that will work a good majority of the time).
  • If collection set to content type mapping in ContentTypeMapData.xml wasn't up to date for one reason or another (even though Tim thinks they still are), would source of the page
    always have the embedded document meta info in a hidden input as per Chris' post above?
  • Yes, I would recommend viewing the source of the page for the meta info hidden input, finding the subContentTypeId, mapping that to the ContentTypeId in the ContentTypeMapData.xml file, and then looking at the Stylesheet attribute on that content type.
  • You don't necessarily need to reach out to LEO to check the mapping. You can look a PAC. PMD Mappings > Collection Stylesheet.
    http://pac.int.westgroup.com:9005/PAC/