Working with XSLT files
Extensible Stylesheet Language Transformations (XSLT) can be used to map custom metadata fields to ENPS wire fields, allowing ingested XML stories to be saved to the server as ENPS formatted XML files. This allows a wide range of agency feeds to be handled.
This section assumes a working knowledge of XSLT files.
Create Custom XSLT
To create a custom XSL transform:
-
Copy a sample XSL transform file from the \NWP\XSL folder on the ENPS WORK drive.
-
Rename the file appropriately - perhaps include the name of the wire being ingested.
-
Use a text editor such as Notepad to modify the settings in the XSL transform file as determined by the wire format.
-
Save the file.
-
Open the \NWP\NWP.ini file in a text editor.
-
Add the following to the
[NWP]
section: -
Restart the News Wire Profiler (NWP).
-
Create your new wire as explained in Wires Via FTP, making sure to:
-
Select the XSL file that you just created from the Story Format menu.
-
Set the Story Start and Story Stop codes to match the root tag of the XML file.
The root tag is the first tag in the file after the
<?xml ...>
XML header.In the following example the Start Code is
<NewsML
and Story Stop code is/NewsML>
. Exclude the close bracket > and open bracket < from the codes.
-