Apply XSLT to add a tag

MMOHAMMAD

New Member
I'm really new to XSLT, most of my work is with InDesign, so please bare with me :)I'm exporting an XML file from InDesign. The text in this file contains superscripts referring to a specific grammatical concept; however, these superscripts are exported as text in the XML file. I need to write an XSLT so that when it's applied to the InDesign file it will simply add a little tag to the superscript.This is how it's currently exported as:\[code\]<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Root><Content><PhraseNative aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="260.5"><Phrase> 1. Mark is1a playing2 videogames.</Phrase> </PhraseNative></Content></Root> \[/code\]This should be the final code.\[code\]<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Root><Content><PhraseNative aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="260.5"><Phrase> 1. Mark is<tag>1a</tag> playing<tag>2</tag> videogames.</Phrase> </PhraseNative></Content></Root>\[/code\]These tags would always appear whenever a number and a letter are the two or three last digits of a string. Sometimes it will be only a number. The output doesn't change at all. This is just so the tags are not lost when exported back into a webpage.Any help would be greatly appreciated.Thanks in advance!
 
Back
Top