Basic Information is I have a Element with an ID
I want to use the ID-Attribute within the document()-Function to extract the content of the -element
I have two Problems here:
1) my saxon Processor wont resolve any fixed! Filepath I provide within de Document Function
-->RESULT: FODC0005 Document has been marked not available: Filepath
Question: Why ???
This is my code so far:
<xsl:template match="pmentry"><xsl:apply-templates/></xsl:template>
<xsl:template match="refdm"><xsl:apply-templates/></xsl:template>
<xsl:element name="datamodule">
<xsl:element name="DMC">DMC-<xsl:value-of select="modelic"/>-<xsl:value-of select="sdc"/>-<xsl:value-of select="chapnum"/>-<xsl:value-of select="section"/><xsl:value-of select="subsect"/>-<xsl:value-of select="subject"/>-<xsl:value-of select="discode"/><xsl:value-of select="discodev"/>-<xsl:value-of select="incode"/><xsl:value-of select="incodev"/>-<xsl:value-of select="itemloc"/>
</xsl:element>
<xsl:element name="CSH">
<xsl:attribute name="ID">DMC-<xsl:value-of select="modelic"/>-<xsl:value-of select="sdc"/>-<xsl:value-of select="chapnum"/>-<xsl:value-of select="section"/><xsl:value-of select="subsect"/>-<xsl:value-of select="subject"/>-<xsl:value-of select="discode"/><xsl:value-of select="discodev"/>-<xsl:value-of select="incode"/><xsl:value-of select="incodev"/>-<xsl:value-of select="itemloc"/></xsl:attribute>
<xsl:value-of select="document(concat('../XML/',@ID,'.xml'))/dmodule/idstatus/status/remarks"/>
</xsl:element>
</xsl:element>
</xsl:template>
2) My second Problem is, I couldn't figure out how to use my ID as the Filename
If anyone has a tip or something i'm really clueless how to do it.
Thanks in advance
Edit: the 3 document()-Function have been for testing where Saxon starts searching the doc
Edit:
So I'm Working in the following Folder setup:
Folder Playground: Subfolder XSLT and XML
The Batch File is on the same Level as the Folders
java -jar XSLT/saxon9he.jar -s:FLARE_Publicationmodul.xml -o:XSLT/remark_list.xml -xsl:XSLT/read_remarks_part1.xsl
now my Plan is to generate this XML-File:
<?xml version="1.0" encoding="utf-8"?>
<list>
<datamodule>
<DMC>DMC-S1000DBIKExsd-AAA-01-00-0000-00A-001A-A</DMC>
<CSH ID="DMC-S1000DBIKExsd-AAA-01-00-0000-00A-001A-A"> Content of the Remarks Element</CSH>
</datamodule>
<datamodule>
<DMC>DMC-S1000DBIKExsd-AAA-D00-00-00-00AA-941A-D</DMC>
<CSH ID="DMC-S1000DBIKExsd-AAA-D00-00-00-00AA-941A-D"> Content of the Remarks Element</CSH>
</datamodule>
...
</list>
So the concat path should simply look like this:
../XML/DMC-S1000DBIKExsd-AAA-D00-00-00-00AA-941A-D.xml
The Path should be right. Saxon prints them in th console, but the @ID information is missing, or if i supply a fixed path like (../XML/1.xml) he checks the Folder but dosent find a file.
Is it possible I have to enable the document Function in Saxon9he?
Or is there an other solution to extract Element Content from other Files?
Thanks for your Help
IDvalue, then tell us exactly which file name or URI you want to create and load. Also consider to run Saxon with the-toption as it then gives more detailed error diagnostics as to which files it tries to load.