@zach.schreiber
You can surely achieve your requirements by modifying only XSLT file. However, it looks like you are using an older version of the API which implements Aspose.Pdf.Generator approach and follows different XML Schema. Please note that old legacy approach has been removed and discontinued already and we are not providing any support related to it neither are we fixing any issues in it.
The latest version(s) of the API use DOM (Document Object Model) approach and support the XML Schema which link we already had shared with you. Using that XML Schema, please check the following sample XSLT and XML along with generated output PDF:
Input XSLT
<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="text()"/>
<xsl:template match="/Contents">
<html>
<Document xmlns="Aspose.Pdf" IsAutoHyphenated="false">
<PageInfo>
<Margin Left="5cm" Right="5cm" Top="3cm" Bottom="15cm" />
</PageInfo>
<Page id="mainSection">
<TextFragment>
<TextSegment>
<xsl:value-of select="Content"/>
</TextSegment>
</TextFragment>
<HtmlFragment>
<![CDATA[
<a href="https://aspose.com">
]]>
<xsl:value-of select="HyperlinkText"/>
<![CDATA[
</a>
]]>
</HtmlFragment>
<TextFragment>
<TextState Font = "Arial" FontSize="8" LineSpacing="4" FontStyle="1" />
<TextSegment>
<xsl:value-of select="BoldText"/>
</TextSegment>
</TextFragment>
</Page>
</Document>
</html>
</xsl:template>
</xsl:stylesheet>
Input XML
<?xml version="1.0" encoding="utf-8" ?>
<Contents>
<Content>Hello World!</Content>
<HyperlinkText>Aspose</HyperlinkText>
<BoldText>Pty Ltd.</BoldText>
</Contents>
Code
var pdf = new Document();
pdf.BindXml(dataDir + "input.xml", dataDir + "input.xslt");
pdf.Save(dataDir + "SampleOut.pdf");
SampleOut.pdf (216.4 KB)