display <!--comments--> as attributes

Feb 29, 2012 at 1:34 PM
Edited Feb 29, 2012 at 4:08 PM

I think it would be nice if the comments that come out were added as attributes on the elements instead of <!--comments-->. There wouldn't be so much need to build descriptions into the XSLTs if they were already in the XML.

Feb 29, 2012 at 3:43 PM
Edited Feb 29, 2012 at 3:51 PM

I'm a little rusty with my xslt... Can you show <!--comments--> from the original XML in your transformed file?

Nope. <!-- --> are ignored by xslt processor.

Feb 29, 2012 at 5:00 PM
Edited Mar 15, 2012 at 10:25 PM

Yes, look at the xslt that does the html.

Feb 29, 2012 at 5:48 PM
Edited Feb 29, 2012 at 5:57 PM

Thanks! I'd already dug that up before your response. That looks like it works just fine.

This document: http://x12parser.codeplex.com/wikipage?title=Parsing an 837 Transaction describes using this code to create formatted HTML:

  var htmlService = new X12HtmlTransformationService(new X12EdiParsingService(suppressComments: false));
  Stream ediFile = new FileStream("c:\\5010_Example1_HealthInsurance.txt", FileMode.Open, FileAccess.Read);
  string html = htmlService.Transform(new StreamReader(ediFile).ReadToEnd());

Use this code where? A new console application? Inserted into the .dll code somewhere? Only for IIS on an MS weberver? Is it already built into the commandline somehow?

BTW: I've locally edited the Ansi-4010Specification.xml to include the 5010 277 claim status codes so that the STC segment error codes have nice comments too. I'm going to do the same for the 999 and 997 AKx segments. I'm not sure that I understand why the 277 spec info was in Ansi-4010Specification.xml. Shouldn't that be in Ansi-5010Specification.xml? I'll play around with moving that to the Ansi-5010Specification.xml and see what happens.