Custom Report Writer - getting HTML from 'documentation' element

Hi Rain / Lilian,

I am writing a custom report for 7.1 that will produce a nice set of tables for each class and its attributes. The XML for the template is:

<?xml version="1.0" encoding="UTF-8"?>
<Template>
	<TemplateInformationHeader name="tjaDocumentClasses" description="/" type="table" default="true"/>
	<ProjectBaseInitiationBlock>
		<!-- classes of project -->
		<IterationBlock modelType="Class" allLevel="true">
			<HasChildElementChecker type="Attribute" flag="true">
				<!--Remove-->
				<TableBlock colWidths="25, 75" tableWidth="16000" alignment="left">
					<TableRow>
						<TableCell leftBorderEnable="false" rightBorderEnable="false">
							<StaticText content="Class Name: " isBold="true"/>
						</TableCell>
						<TableCell leftBorderEnable="false" rightBorderEnable="false">
							<StringPropertyText propertyText="name" style="Table Contents"/>
						</TableCell>
					</TableRow>
					<TableRow>
						<TableCell leftBorderEnable="false" rightBorderEnable="false">
							<StaticText content="Documentation: " isBold="true"/>
						</TableCell>
						<TableCell leftBorderEnable="false" rightBorderEnable="false">
							<StringPropertyText propertyText="documentation" style="Table Contents"/>
						</TableCell>
					</TableRow>
					<HasChildElementChecker type="Attribute" flag="true">
						<TableRow>
							<TableCell leftBorderEnable="false" rightBorderEnable="false">
								<StaticText content="Attributes:  " isBold="true"/>
							</TableCell>
							<TableCell leftBorderEnable="false" rightBorderEnable="false" splitted="true">
								<TableRow>
									<TableCell leftBorderEnable="false" rightBorderEnable="false">
										<StaticText content="Name" style="Column header 1"/>
									</TableCell>
									<TableCell leftBorderEnable="false" rightBorderEnable="false">
										<StaticText content="Data Type" style="Column header 1"/>
									</TableCell>
									<TableCell leftBorderEnable="false" rightBorderEnable="false">
										<StaticText content="Description" style="Column header 1"/>
									</TableCell>
								</TableRow>
								<IterationBlock modelType="Attribute">
									<TableRow>
										<TableCell leftBorderEnable="false" rightBorderEnable="false">
											<StringPropertyText propertyText="name" style="Table Contents"/>
										</TableCell>
										<TableCell leftBorderEnable="false" rightBorderEnable="false">
											<StringPropertyText propertyText="type" style="Table Contents"/>
										</TableCell>
										<TableCell leftBorderEnable="false" rightBorderEnable="false">
											<StringPropertyText propertyText="documentation" style="Table Contents"/>
										</TableCell>
									</TableRow>
								</IterationBlock>
							</TableCell>
						</TableRow>
					</HasChildElementChecker>
				</TableBlock>
				<StaticText content="" style="Default"/>
				<ParagraphBreak/>
			</HasChildElementChecker>
		</IterationBlock>
	</ProjectBaseInitiationBlock>
</Template>

Which works perfectly…apart from when it gets to the attribute documentation element it returns it as the HTML from the model rather than plain text - Can you tell me what I am doing wrong?? its driving me nuts!

Many thanks

Toby

Hi Toby,

Thanks for your post. Our engineers fixed the problem and please run “VP Suite Update” in VPSuite/bin folder for updating your VP-UML to latest patch (20091007k or later) for the fix. If you need more details about update to latest patch, please visit:

BTW, if you want to force the documentation to be generated in plain text, please add
forcePlainText=“true”
to <StringPropertyText …> in your template, as shown as attached image.

Please feel free to contact me if there is anything else I can do to help.

Best regards,
Lilian Wong

forcePlainText.png

Many thanks Lilian - as always your support is second to none!

Hi Toby,

You are welcome. :smiley:

Best regards,
Lilian Wong