forward.xsl and immediate ERROR

85 views
Skip to first unread message

rrose...@securerad.com

unread,
Sep 18, 2017, 12:39:36 PM9/18/17
to dcm...@googlegroups.com
Hello,

I've tried both of the following as forward.xsl
<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

    <xsl:output method="xml"/>


    <xsl:template match="/dataset">

    <destinations>

        <!-- Forward mamms to cloud -->

        <xsl:if test="normalize-space(attr[@tag='00080016'])='1.2.840.10008.5.1.4.1.1.1.2'">

            <destination aet="TO_SRCLOUD"/>

        </xsl:if>

    </destinations>

    </xsl:template>

</xsl:stylesheet>


and

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

    <xsl:output method="xml"/>


    <xsl:template match="/dataset">

    <destinations>

        <!-- Forward mamms to cloud -->

        <xsl:if test="attr[@tag='00080016']='1.2.840.10008.5.1.4.1.1.1.2'">

            <destination aet="TO_SRCLOUD"/>

        </xsl:if>

    </destinations>

    </xsl:template>

</xsl:stylesheet>


And neither seem to work.
In server.log, I see:
2017-09-18 12:02:39,083 INFO  -> (Thread-65) [org.dcm4chex.archive.mbean.TemplatesService] Compiling Stylesheet /purview/dcm4chee-2.18.1-mysql/server/default/conf/dcm4chee-ae/forward.xsl

2017-09-18 12:02:39,086 ERROR -> (Thread-65) [STDERR] Warning:  org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.


1. Is the ERROR directly related to the reading of the XML file?
2. Does anyone have any idea why this forwarding rule won't work?

Thanks,

Rich

rrose...@securerad.com

unread,
Sep 19, 2017, 1:22:50 PM9/19/17
to dcm4che
Background-- This became an issue when trying to route parts of tomo studies... It turns out that Seimens tomo uses MG as the modality type for all of the images, even though the SOP Class is CT (for the CT images in the study, not the MG images)

I think I might have found the issue, so I'm posting this so others may not struggle....

I'm pretty sure that using forward.xsl only works at the study and series level. SOP Class is at the instance level. According to Damien at the bottom of http://www.dcm4che.org/jira/browse/DCMEE-320, "For the resolution of this issue, it would be nice if the configuration allowed for routing based on the content of any DICOM tag, called AE title (in addition to the current calling AE title), and/or time of day."

I agree, but it seems to not be the case. I was lucky in that I was able to use part of the Series Description in order to accomplish the same task. However, I'm lucky that the descriptions are fixed, whereas if it was another modality or situation, I might have not been so lucky.

here is my file:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="xml"/>

    <xsl:template match="/dataset">
    <destinations>
        <!-- Forward mamms to cloud -->
        <xsl:if test="starts-with(attr[@tag='0008103E'],'T_PR')">
            <destination aet="DCM4CHEE"/>
        </xsl:if>

        <xsl:if test="starts-with(attr[@tag='0008103E'],'MAMMOGRAM')">
            <destination aet="DCM4CHEE"/>
        </xsl:if>
        
    </destinations>
    </xsl:template>
</xsl:stylesheet>


Rich

On Monday, September 18, 2017 at 12:39:36 PM UTC-4, rrose...@securerad.com wrote:
Hello,

I've tried both of the following as forward.xsl
Enter code here...<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

    <xsl:output method="xml"/>


    <xsl:template match="/dataset">

    <destinations>

        <!-- Forward mamms to cloud -->

        <xsl:if test="normalize-space(attr[@tag='00080016'])='1.2.840.10008.5.1.4.1.1.1.2'">

            <destination aet="TO_SRCLOUD"/>

        </xsl:if>

    </destinations>

    </xsl:template>

</xsl:stylesheet>


and

Enter <?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

    <xsl:output method="xml"/>


    <xsl:template match="/dataset">

    <destinations>

        <!-- Forward mamms to cloud -->

        <xsl:if test="attr[@tag='00080016']='1.2.840.10008.5.1.4.1.1.1.2'">

            <destination aet="TO_SRCLOUD"/>

        </xsl:if>

    </destinations>

    </xsl:template>

</xsl:stylesheet>


And neither seem to work.
In server.log, I see:
Enter code here...2017-09-18 12:02:39,083 INFO  -> (Thread-65) [org.dcm4chex.archive.mbean.TemplatesService] Compiling Stylesheet /purview/dcm4chee-2.18.1-mysql/server/default/conf/dcm4chee-ae/forward.xsl

2017-09-18 12:02:39,086 ERROR -> (Thread-65) [STDERR] Warning:  org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.


1. Is the ERROR directly related to the reading of the XML file?
Reply all
Reply to author
Forward
0 new messages