Project

Profile

Help

XTDE0410 error (XML + XSL samples)

Added by Anonymous almost 17 years ago

Legacy ID: #4559866 Legacy Poster: DjFac (djfac)

Hello, I'm software engineer from France and one part of my job was to convert xml into pdf files. The process I chose can be split up as show below: XML - > HTML (SAXON) HTML -> XHTML (TIDY) XHTML -> PDF (FOP) I already tested this process working very well (as far as I know) Nevertheless, I encountered an issue using SAXON for some XML files whereas other ones worked without problem. --------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------- Here is a sample of an xml file that SAXON did not succeed to transform: <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet href="http://www.fda.gov/oc/datacouncil/stylesheets/spl/spl.xsl" type="text/xsl"?> <document xmlns="urn:hl7-org:v3" xmlns:voc="http://www.hl7.org/v3/voc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:hl7-org:v3 http://www.fda.gov/oc/datacouncil/schemas/spl/spl.xsd"> <id root="018A8807-1331-41C3-4889-C7EC502A9043" /> <code code="34391-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Human prescription drug label" /> <title mediaType="text/x-hl7-title+xml">CONCENTRATE<br /><content styleCode="italics">CAUTION: MUST BE DILUTED FOR I.V. USE</content><br />14.6%<br />SODIUM CHLORIDE Injection, USP</title> <effectiveTime value="20060829" /> <setId root="018A8807-1331-41C3-4889-C7EC502A9043" /> <versionNumber value="1" /> <author> <time /> <assignedEntity> <id root="55AC84B4-98AE-4758-2D9F-C1F1DE9ECE04" /> <representedOrganization> <name>Hospira, Inc.</name> <addr /> </representedOrganization> </assignedEntity> </author> <component> <structuredBody> <component> <section> <id root="EF4DE23E-7F68-DA07-DE55-2D1E85F6572C" /> <effectiveTime value="20060829" /> <subject> <manufacturedProduct> <manufacturedMedicine> <code code="0409-6657" codeSystem="2.16.840.1.113883.6.69" /> <name>Sodium Chloride</name> <formCode code="C42899" codeSystem="2.16.840.1.113883.3.26.1.1" displayName="INJECTION, SOLUTION, CONCENTRATE" /> <activeIngredient> <quantity> <numerator unit="g" value="2.92"> <translation code="C48155" codeSystem="2.16.840.1.113883.3.26.1.1" displayName="GRAM" value="2.92" /> </numerator> <denominator unit="mL" value="20"> <translation code="C28254" codeSystem="2.16.840.1.113883.3.26.1.1" displayName="MILLILITER" value="20" /> </denominator> </quantity> <activeIngredientSubstance> <code code="451W47IQ8X" codeSystem="2.16.840.1.113883.4.9" codeSystemName="FDA SRS" /> <name>Sodium Chloride</name> <activeMoiety> <activeMoiety> <code code="451W47IQ8X" codeSystem="2.16.840.1.113883.4.9" codeSystemName="FDA SRS" /> <name>Sodium Chloride</name> </activeMoiety> </activeMoiety> </activeIngredientSubstance> </activeIngredient> <asEntityWithGeneric> <genericMedicine> <name>Sodium Chloride</name> </genericMedicine> </asEntityWithGeneric> <inactiveIngredient> <inactiveIngredientSubstance> <code code="059QF0KO0R" codeSystem="2.16.840.1.113883.4.9" codeSystemName="FDA SRS" /> <name>Water</name> </inactiveIngredientSubstance> </inactiveIngredient> <inactiveIngredient> <inactiveIngredientSubstance> <code code="QTT17582CB" codeSystem="2.16.840.1.113883.4.9" codeSystemName="FDA SRS" /> <name>Hydrochloric Acid</name> </inactiveIngredientSubstance> </inactiveIngredient> <asContent> <quantity> <numerator unit="mL" value="20"> <translation code="C28254" codeSystem="2.16.840.1.113883.3.26.1.1" displayName="MILLILITER" value="20" /> </numerator> <denominator value="1"> <translation value="1" /> </denominator> </quantity> <containerPackagedMedicine> <code /> <formCode code="C43215" codeSystem="2.16.840.1.113883.3.26.1.1" displayName="VIAL, SINGLE-DOSE" /> <asContent> <quantity> <numerator value="25"> <translation code="C48551" codeSystem="2.16.840.1.113883.3.26.1.1" displayName="VIAL" value="25" /> </numerator> <denominator value="1"> <translation value="1" /> </denominator> </quantity> <containerPackagedMedicine> <code codeSystem="2.16.840.1.113883.6.69" codeSystemName="FDA" displayName="NDC" /> <formCode code="C53438" codeSystem="2.16.840.1.113883.3.26.1.1" displayName="TRAY" /> <asContent> <quantity> <numerator value="4"> <translation code="C54704" codeSystem="2.16.840.1.113883.3.26.1.1" displayName="TRAY" value="4" /> </numerator> <denominator value="1"> <translation value="1" /> </denominator> </quantity> <containerPackagedMedicine> <code code="0409-6657-73" codeSystem="2.16.840.1.113883.6.69" codeSystemName="NDC" /> <formCode code="C43184" codeSystem="2.16.840.1.113883.3.26.1.1" displayName="CASE" /> </containerPackagedMedicine> </asContent> </containerPackagedMedicine> </asContent> </containerPackagedMedicine> </asContent> </manufacturedMedicine> <consumedIn> <substanceAdministration> <routeCode code="C38276" codeSystem="2.16.840.1.113883.3.26.1.1" displayName="INTRAVENOUS" /> </substanceAdministration> </consumedIn> </manufacturedProduct> </subject> <subject> <manufacturedProduct> <manufacturedMedicine> <code code="0409-6660" codeSystem="2.16.840.1.113883.6.69" /> <name>Sodium Chloride</name> <formCode code="C42899" codeSystem="2.16.840.1.113883.3.26.1.1" displayName="INJECTION, SOLUTION, CONCENTRATE" /> <activeIngredient> <quantity> <numerator unit="g" value="5.84"> <translation code="C48155" codeSystem="2.16.840.1.113883.3.26.1.1" displayName="GRAM" value="5.84" /> </numerator> <denominator unit="mL" value="40"> <translation code="C28254" codeSystem="2.16.840.1.113883.3.26.1.1" displayName="MILLILITER" value="40" /> </denominator> </quantity> <activeIngredientSubstance> <code code="451W47IQ8X" codeSystem="2.16.840.1.113883.4.9" codeSystemName="FDA SRS" /> <name>Sodium Chloride</name> <activeMoiety> <activeMoiety> <code code="451W47IQ8X" codeSystem="2.16.840.1.113883.4.9" codeSystemName="FDA SRS" /> <name>Sodium Chloride</name> </activeMoiety> </activeMoiety> </activeIngredientSubstance> </activeIngredient> <asEntityWithGeneric> <genericMedicine> <name>Sodium Chloride</name> </genericMedicine> </asEntityWithGeneric> <inactiveIngredient> <inactiveIngredientSubstance> <code code="059QF0KO0R" codeSystem="2.16.840.1.113883.4.9" codeSystemName="FDA SRS" /> <name>Water</name> </inactiveIngredientSubstance> </inactiveIngredient> <inactiveIngredient> <inactiveIngredientSubstance> <code code="QTT17582CB" codeSystem="2.16.840.1.113883.4.9" codeSystemName="FDA SRS" /> <name>Hydrochloric Acid</name> </inactiveIngredientSubstance> </inactiveIngredient> <asContent> <quantity> <numerator unit="mL" value="40"> <translation code="C28254" codeSystem="2.16.840.1.113883.3.26.1.1" displayName="MILLILITER" value="40" /> </numerator> <denominator value="1"> <translation value="1" /> </denominator> </quantity> <containerPackagedMedicine> <code /> <formCode code="C43215" codeSystem="2.16.840.1.113883.3.26.1.1" displayName="VIAL, SINGLE-DOSE" /> <asContent> <quantity> <numerator value="25"> <translation code="C48551" codeSystem="2.16.840.1.113883.3.26.1.1" displayName="VIAL" value="25" /> </numerator> <denominator value="1"> <translation value="1" /> </denominator> </quantity> <containerPackagedMedicine> <code /> <formCode code="C53438" codeSystem="2.16.840.1.113883.3.26.1.1" displayName="TRAY" /> <asContent> <quantity> <numerator value="4"> <translation code="C54704" codeSystem="2.16.840.1.113883.3.26.1.1" displayName="TRAY" value="4" /> </numerator> <denominator value="1"> <translation value="1" /> </denominator> </quantity> <containerPackagedMedicine> <code code="0409-6660-75" codeSystem="2.16.840.1.113883.6.69" codeSystemName="NDC" /> <formCode code="C43184" codeSystem="2.16.840.1.113883.3.26.1.1" displayName="CASE" /> </containerPackagedMedicine> </asContent> </containerPackagedMedicine> </asContent> </containerPackagedMedicine> </asContent> </manufacturedMedicine> <consumedIn> <substanceAdministration> <routeCode code="C38276" codeSystem="2.16.840.1.113883.3.26.1.1" displayName="INTRAVENOUS" /> </substanceAdministration> </consumedIn> </manufacturedProduct> </subject> </section> </component> <component> <section> <id root="21218819-B91F-397B-D350-05D1B3BA634A" /> <code code="42229-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="SPL UNCLASSIFIED SECTION" /> <title mediaType="text/x-hl7-title+xml" /> <text><paragraph><content styleCode="bold">50 or 100 mEq (2.5 mEq/mL)</content></paragraph><paragraph><content styleCode="bold">Additive Solution</content></paragraph><paragraph><content styleCode="bold">Concentrated Solution</content>&#8212; For use only after dilution with compatible I.V. fluids to correct sodium deficiency when oral replacement is not feasible.</paragraph><paragraph><content styleCode="bold">Plastic Vial</content></paragraph><paragraph>R<sub>x</sub> only</paragraph></text> <effectiveTime value="20060829" /> </section> </component> <component> <section> <id root="FF6EB854-8457-F1B1-1FBB-878FC8D0A008" /> <code code="34089-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="DESCRIPTION SECTION" /> <title mediaType="text/x-hl7-title+xml">DESCRIPTION</title> <text><paragraph>14.6% Sodium Chloride Injection, USP Additive Solution is a sterile, nonpyrogenic, concentrated solution for intravenous administration ONLY AFTER DILUTION to replenish electrolytes. The preparations contain either 2.92 or 5.84 g of sodium chloride (50 or 100 mEq each of Na<sup>+</sup> and Cl<sup>&#8722;</sup>) in Water for Injection, USP. The solution contains no bacteriostat, antimicrobial agent or added buffer; pH 4.8 (4.5 to 7.0). May contain hydrochloric acid for pH adjustment. The osmolar concentration is 5 mOsmol/mL (calc.); specific gravity is 1.10.</paragraph><paragraph>Sodium Chloride, USP is chemically designated NaCl, a white crystalline compound freely soluble in water.</paragraph><paragraph>The semi-rigid material used for the plastic vials is fabricated from a specially formulated polyolefin. It is a copolymer of ethylene and propylene. The safety of the plastic has been confirmed by tests in animals according to USP biological standards for plastic containers. The container requires no vapor barrier to maintain the proper drug concentration.</paragraph></text> <effectiveTime value="20060829" /> </section> </component> <component> <section> <id root="C7B27AFC-1450-AF47-7709-BF279599F299" /> <code code="34090-1" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="CLINICAL PHARMACOLOGY SECTION" /> <title mediaType="text/x-hl7-title+xml">CLINICAL PHARMACOLOGY</title> <text><paragraph>Sodium chloride in water dissociates to provide sodium (Na<sup>+</sup>) and chloride (Cl<sup>&#8722;</sup>) ions. These ions are normal constituents of the body fluids (principally extracellular) and are essential for maintaining electrolyte balance. </paragraph><paragraph>Sodium is the principal cation of extracellular fluid. It comprises more than 90% of the total cations at its normal plasma concentration of approximately 142 mEq/liter. While the sodium ion can diffuse across cell membranes, intracellular sodium is maintained at a much lower concentration than extracellular sodium through the expenditure of energy by the cell (so called &#8220;sodium&#160;cation&#160;pump&#8221;). Loss of intracellular potassium ion is usually accompanied by an increase in intracellular sodium ion.</paragraph><paragraph>When serum sodium concentration is low, the secretion of antidiuretic hormone (ADH) by the pituitary is inhibited, thereby preventing water reabsorption by the distal renal tubules. On the other hand, adrenal secretion of aldosterone increases renal tubular reabsorption of sodium in an effort to re-establish normal serum sodium concentration.</paragraph><paragraph>Chloride (Cl<sup>&#8722;</sup>) has an integral role in buffering action when oxygen and carbon dioxide exchange occurs in the red blood cells.</paragraph><paragraph>The distribution and excretion of sodium (Na<sup>+</sup>) and chloride (Cl<sup>&#8722;</sup>) are largely under the control of the kidney which maintains a balance between intake and output.</paragraph></text> <effectiveTime value="20060829" /> </section> </component> <component> <section> <id root="8A5C539F-9503-FB2F-F453-C6234CC0B663" /> <code code="34067-9" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="INDICATIONS &amp; USAGE SECTION" /> <title mediaType="text/x-hl7-title+xml">INDICATIONS AND USAGE</title> <text><paragraph>14.6% Sodium Chloride Injection, USP Additive Solution is indicated for parenteral restoration of sodium ion in patients with restricted oral intake. Sodium replacement is specifically indicated in patients with hyponatremia or low salt syndrome. 14.6% Sodium Chloride Additive Solution may also be added to compatible carbohydrate solutions such as dextrose in water to provide electrolytes.</paragraph></text> <effectiveTime value="20060829" /> </section> </component> <component> <section> <id root="AFA8BC8D-C656-1F19-FCB1-7E5ACDAC6DED" /> <code code="34070-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="CONTRAINDICATIONS SECTION" /> <title mediaType="text/x-hl7-title+xml">CONTRAINDICATIONS</title> <text><paragraph>14.6% Sodium Chloride Injection, USP Additive Solution is contraindicated in patients with hypernatremia or fluid retention.</paragraph></text> <effectiveTime value="20060829" /> </section> </component> <component> <section> <id root="DFC3D0FC-5964-689F-9AE0-E33472EEB942" /> <code code="34071-1" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="WARNINGS SECTION" /> <title mediaType="text/x-hl7-title+xml">WARNINGS</title> <text><paragraph>14.6% Sodium Chloride Injection, USP is hypertonic and must be diluted prior to administration. Inadvertent direct injection or absorption of concentrated sodium chloride solution may give rise to sudden hypernatremia and such complications as cardiovascular shock, central nervous system disorders, extensive hemolysis, cortical necrosis of the kidneys and severe local tissue necrosis (if administered extravascularly).</paragraph><paragraph>Solutions containing sodium ions should be used with great care, if at all, in patients with congestive heart failure, severe renal insufficiency and in clinical states in which there exists edema with sodium retention.</paragraph><paragraph>In patients with diminished renal function, administration of solutions containing sodium may result in sodium retention.</paragraph><paragraph>The intravenous administration of this solution (after appropriate dilution) can cause fluid and/or solute overload resulting in dilution of other serum electrolyte concentrations, overhydration, congested states or pulmonary edema.</paragraph><paragraph>Excessive administration of potassium free solutions may result in significant hypokalemia.</paragraph><paragraph>WARNING: This product contains aluminum that may be toxic. Aluminum may reach toxic levels with prolonged parenteral administration if kidney function is impaired. Premature neonates are particularly at risk because their kidneys are immature, and they require large amounts of calcium and phosphate solutions, which contain aluminum.</paragraph><paragraph>Research indicates that patients with impaired kidney function, including premature neonates, who receive parenteral levels of aluminum at greater than 4 to 5 mcg/kg/day accumulate aluminum at levels associated with central nervous system and bone toxicity. Tissue loading may occur at even lower rates of administration.</paragraph></text> <effectiveTime value="20060829" /> </section> </component> <component> <section> <id root="6101D71E-3581-80B6-3167-FE028541EAE2" /> <code code="42232-9" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="PRECAUTIONS SECTION" /> <title mediaType="text/x-hl7-title+xml">PRECAUTIONS</title> <text><paragraph>14.6% Sodium Chloride Injection, USP Additive Solution must be diluted before infusion to avoid a sudden increase in the level of plasma sodium. Too rapid administration should be avoided.</paragraph><paragraph>Special caution should be used in administering sodium containing solutions to patients with severe renal impairment, cirrhosis of the liver, cardiac failure, or other edematous or sodium-retaining states.</paragraph><paragraph>Clinical evaluation and periodic laboratory determinations are necessary to monitor changes in fluid balance, electrolyte concentrations, and acid-base balance during prolonged parenteral therapy or whenever the condition of the patient warrants such evaluation.</paragraph><paragraph>Caution must be exercised in the administration of parenteral fluids, especially those containing sodium ions, to patients receiving corticosteroids or corticotropin.</paragraph><paragraph>Do not use unless the solution is clear and seal is intact. Discard unused portion.</paragraph></text> <effectiveTime value="20060829" /> <component> <section> <id root="85D4A112-D860-2614-8FB2-9166114E5355" /> <code code="42228-7" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="PREGNANCY SECTION" /> <title mediaType="text/x-hl7-title+xml">Pregnancy Category C.</title> <text><paragraph>Animal reproduction studies have not been conducted with sodium chloride. It is also not known whether sodium chloride can cause fetal harm when administered to a pregnant woman or can affect reproduction capacity. Sodium chloride should be given to a pregnant woman only if clearly needed.</paragraph></text> <effectiveTime value="20060829" /> </section> </component> <component> <section> <id root="6F8F89F7-BB29-7A15-7048-E7329ADB1935" /> <code code="34082-8" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="GERIATRIC USE SECTION" /> <title mediaType="text/x-hl7-title+xml">Geriatric Use</title> <text><paragraph>An evaluation of current literature revealed no clinical experience identifying differences in response between elderly and younger patients. In general, dose selection for an elderly patient should be cautious, usually starting at the low end of the dosing range, reflecting the greater frequency of decreased hepatic, renal, or cardiac function, and of concomitant disease or other drug therapy.</paragraph><paragraph>This drug is known to be substantially excreted by the kidney, and the risk of toxic reactions to this drug may be greater in patients with impaired renal function. Because elderly patients are more likely to have decreased renal function, care should be taken in dose selection, and it may be useful to monitor renal function.</paragraph></text> <effectiveTime value="20060829" /> </section> </component> <component> <section> <id root="1919EB2B-F758-F41B-2A10-1B642E355C6C" /> <code code="34081-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="PEDIATRIC USE SECTION" /> <title mediaType="text/x-hl7-title+xml">Pediatric Use</title> <text><paragraph>The safety and effectiveness of 14.6% Sodium Chloride Injection, USP Additive Solution have not been established. Its limited use in pediatric patients has been inadequate to fully define proper dosage and limitations for use.</paragraph></text> <effectiveTime value="20060829" /> </section> </component> </section> </component> <component> <section> <id root="B5032D70-C957-05B2-5D86-6CD87EF71CCA" /> <code code="34084-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="ADVERSE REACTIONS SECTION" /> <title mediaType="text/x-hl7-title+xml">ADVERSE REACTIONS</title> <text><paragraph>Sodium overload can occur with intravenous infusion of excessive amounts of sodium-containing solutions. See WARNINGS and PRECAUTIONS. </paragraph></text> <effectiveTime value="20060829" /> </section> </component> <component> <section> <id root="705D2A4E-A5CB-BCAE-DAF4-A5D99D6FD88E" /> <code code="34088-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="OVERDOSAGE SECTION" /> <title mediaType="text/x-hl7-title+xml">OVERDOSAGE</title> <text><paragraph>In the event of overhydration or solute overload, re-evaluate the patient and institute appropriate corrective measures. See WARNINGS and PRECAUTIONS.</paragraph></text> <effectiveTime value="20060829" /> </section> </component> <component> <section> <id root="48AE23F1-00BF-5722-B8C5-C8E44D98DC4E" /> <code code="34068-7" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="DOSAGE &amp; ADMINISTRATION SECTION" /> <title mediaType="text/x-hl7-title+xml">DOSAGE AND ADMINISTRATION</title> <text><paragraph>14.6% Sodium Chloride Injection, USP Additive Solution is administered intravenously <content styleCode="italics">only after addition to a larger volume of fluid.</content></paragraph><paragraph>The dose, dilution and rate of injection are dependent upon the individual needs of each patient.</paragraph><paragraph>All or part of the contents of one or more additive containers may be added to an intravenous solution container. Concentrations of up to 5% sodium chloride have been administered.</paragraph><paragraph>Parenteral drug products should be inspected visually for particulate matter and discoloration prior to administration, whenever solution and container permit. See PRECAUTIONS.</paragraph></text> <effectiveTime value="20060829" /> </section> </component> <component> <section> <id root="E876F9A8-8467-95A1-87ED-07C724BDBDF4" /> <code code="34069-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="HOW SUPPLIED SECTION" /> <title mediaType="text/x-hl7-title+xml">HOW SUPPLIED</title> <text><paragraph>14.6% Sodium Chloride Injection, USP Additive Solution is supplied as the following single-dose units:</paragraph><table frame="below"><caption /> <colgroup> <col /> <col /> <col /> <col /> </colgroup> <tbody> <tr><td valign="top"><paragraph><content styleCode="bold">List No.</content></paragraph></td><td align="center" valign="top"><paragraph><content styleCode="bold">Container Type</content></paragraph></td><td align="center" valign="top"><paragraph><content styleCode="bold">Dose/Volume Provided</content></paragraph></td><td align="center" valign="top"><paragraph><content styleCode="bold">Concentration</content></paragraph></td></tr> <tr><td valign="top"><paragraph>6657</paragraph></td><td align="center" valign="top"><paragraph>Plastic Fliptop Vial</paragraph></td><td align="center" valign="top"><paragraph>50 mEq/20 mL</paragraph></td><td align="center" valign="top"><paragraph>2.5 mEq/mL</paragraph></td></tr> <tr><td valign="top"><paragraph>6660</paragraph></td><td align="center" valign="top"><paragraph>Plastic Fliptop Vial</paragraph></td><td align="center" valign="top"><paragraph>100 mEq/40 mL</paragraph></td><td align="center" valign="top"><paragraph>2.5 mEq/mL</paragraph></td></tr> </tbody> </table><paragraph>Store at controlled room temperature 15&#176; to 30&#176;C (59&#176; to 86&#176;F) [See USP.]</paragraph><table frame="void"><caption /> <colgroup> <col /> <col /> <col /> </colgroup> <tbody> <tr><td valign="top" /><td valign="top" /><td align="right" valign="bottom" /></tr> <tr><td valign="top"><paragraph>&#169;Hospira 2004</paragraph></td><td align="center" valign="top"><paragraph>EN-0226</paragraph></td><td align="right" valign="top"><paragraph>Printed in USA</paragraph></td></tr> </tbody> </table><paragraph><content styleCode="italics">HOSPIRA, INC., LAKE FOREST, IL 60045 USA</content></paragraph></text> <effectiveTime value="20060829" /> </section> </component> </structuredBody> </component> </document> --------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------- Then here are samples of the xsl stylesheets used for the transformation: [SPL.XSL] <?xml version="1.0" encoding="ASCII"?> <xsl:transform version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:v3="urn:hl7-org:v3" exclude-result-prefixes="v3 xsl"> <xsl:import href="spl-common.xsl"/> <!-- Whether to show the clickable XML, set to "/.." instead of "1" to turn off --> <xsl:param name="show-subjects-xml" select="/.."/> <!-- Whether to show the data elements in special tables etc., set to "/.." instead of "1" to turn off --> <xsl:param name="show-data" select="1"/> <!-- This is the CSS link put into the output --> <xsl:param name="css">./spl.css</xsl:param> <!-- Whether to show section numbers, set to 1 to enable and "/.." to turn off--> <xsl:param name="show-section-numbers" select="/.."/> <xsl:output method="html" version="4.0" encoding="UTF-8" indent="yes"/> <xsl:strip-space elements=""/> </xsl:transform> --------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------- [SPL-COMMON.XSL] <?xml version="1.0" encoding="ASCII"?> <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:v3="urn:hl7-org:v3" xmlns:exsl="http://exslt.org/common" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" exclude-result-prefixes="exsl msxsl v3 xsl xsi"> <xsl:import href="xml-verbatim.xsl"/> <xsl:param name="show-subjects-xml" select="1"/> <xsl:param name="show-data" select="/.."/> <xsl:param name="show-section-numbers" select="/.."/> <xsl:param name="update-check-url-base" select="/.."/> <xsl:param name="standardSections" select="document('plr-sections.xml')/"/> <xsl:param name="css" select="'./spl.css'"/> <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:strip-space elements=""/> <!-- TOPLEVEL --> <xsl:variable name="numHighlightSections" select="number(count(//v3:section[descendant::v3:highlight and not(ancestor::v3:section) and not(./v3:code[descendant-or-self::[(self::v3:code or self::v3:translation) and @codeSystem='2.16.840.1.113883.6.1' and @code='34066-1' or @code='43683-2']])]/v3:excerpt) div 2)"/> <xsl:template match="/"> <html> <head> <title> <xsl:value-of select="v3:document/v3:title"/> </title> <link rel="stylesheet" type="text/css" href="{$css}"/> <xsl:if test="$show-subjects-xml"> <xsl:call-template name="xml-verbatim-setup"/> </xsl:if> </head> <body> <xsl:if test="v3:document/v3:code/@code != '45129-4'"> <!-- call the effectiveDate template that print the effectiveDate at the top of the label if the effectiveDate exists --> <!-- commmented out per PCR 528 --> <!--xsl:call-template name="effectiveDate"/--> <!-- display the document title before any labeling information --> <xsl:apply-templates mode="title" select="v3:document/v3:title"/> </xsl:if> <!-- call the highlight template which will display highlights if any exists. --> <xsl:if test="$numHighlightSections > 0"> <xsl:call-template name="highlights"/> <!-- call the index template which will display the table of contents --> <xsl:call-template name="index"/> <!-- now apply all other template which will display the labeling content --> <strong>FULL PRESCRIBING INFORMATION</strong> </xsl:if> <xsl:apply-templates select="@|node()"/> <!-- call the PLRInfo template which will display the PLR tables if neccessary --> <xsl:call-template name="PLRIndications"/> <xsl:call-template name="PLRInteractions"/> <xsl:call-template name="PharmacologicalClass"/> <br/> <!-- apply the templates for displaying all subject element in the label no matter where they reside in the XML --> <xsl:apply-templates mode="subjects" select="/v3:document/v3:component/v3:structuredBody/v3:component//v3:section/v3:subject"/> <!-- the stylesheet will now display the effective date for ALL SPL's per PCR 528 --> <!--xsl:if test="v3:document/v3:code/@code != '45129-4'"--> <!-- call the effectiveDate template that print the effectiveDate at the bottom of the label if the effectiveDate exists --> <xsl:call-template name="effectiveDate"/> <!--/xsl:if--> <xsl:if test="$show-subjects-xml"> <!-- SHOW THE WHOLE XML DOCUMENT AT THE END --> <hr/> <div class="Subject" onclick="xmlVerbatimClick(event);" ondblclick="xmlVerbatimDblClick(event);"> <xsl:apply-templates mode="xml-verbatim" select="node()"/> </div> </xsl:if> </body> </html> </xsl:template> <!-- helper templates --> <xsl:template name="string-lowercase"> <xsl:param name="text"/> <xsl:value-of select="translate($text,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')"/> </xsl:template> <xsl:template name="string-uppercase"> <xsl:param name="text"/> <xsl:value-of select="translate($text,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/> </xsl:template> <xsl:template name="printSeperator"> <xsl:param name="currentPos" select="position()"/> <xsl:param name="lastPos" select="last()"/> <xsl:param name="lastDelimiter">and</xsl:param> <xsl:choose> <xsl:when test="number($currentPos) = number($lastPos)-1"><xsl:value-of select="$lastDelimiter"/>&#160;</xsl:when> <xsl:when test="number($currentPos) &lt; number($lastPos)-1">,&#160;</xsl:when> </xsl:choose> </xsl:template> <!-- MAIN MODE based on the deep null-transform --> <xsl:template match="@|node()"> <xsl:apply-templates select="@|node()"/> </xsl:template> <!-- MODE HIGHLIGHTS --> <xsl:template name="highlights"> <table class="textHighlights"> <tbody> <tr> <td width="50%" class="textHighlights" align="justify" vAlign="top"> <table cellSpacing="1" cellPadding="3" border="0"> <tbody> <tr> <td colSpan="2"><strong>HIGHLIGHTS OF PRESCRIBING INFORMATION</strong></td> </tr> <tr> <td align="justify" vAlign="top"> <strong>These highlights do not include all the information needed to use <span class="titleCase"><xsl:call-template name="string-lowercase"><xsl:with-param name="text" select="//v3:subject/v3:manufacturedProduct/v3:manufacturedMedicine/v3:name"/></xsl:call-template></span> safely and effectively. See full prescribing information for <span class="titleCase"><xsl:call-template name="string-lowercase"><xsl:with-param name="text" select="//v3:subject/v3:manufacturedProduct/v3:manufacturedMedicine/v3:name"/></xsl:call-template></span>.</strong> </td> </tr> <tr> <td> <strong><span class="titleCase"><xsl:call-template name="string-lowercase"><xsl:with-param name="text" select="//v3:subject/v3:manufacturedProduct/v3:manufacturedMedicine/v3:name"/></xsl:call-template></span>&#160;(<span class="lowerCase"><xsl:value-of select="//v3:subject/v3:manufacturedProduct/v3:manufacturedMedicine/v3:asEntityWithGeneric/v3:genericMedicine/v3:name"/></span>)&#160; <span class="titleCase"><xsl:call-template name="string-lowercase"><xsl:with-param name="text" select="//v3:subject/v3:manufacturedProduct/v3:manufacturedMedicine/v3:formCode/@displayName"/></xsl:call-template></span> &#160;for&#160;<span class="titleCase"><xsl:call-template name="string-lowercase"><xsl:with-param name="text" select="//v3:subject/v3:manufacturedProduct/v3:consumedIn/v3:substanceAdministration/v3:routeCode/@displayName"/></xsl:call-template></span> use <xsl:if test="//v3:subject/v3:manufacturedProduct/v3:subjectOf/v3:policy/v3:code/@displayName != ''"> - <xsl:value-of select="//v3:subject/v3:manufacturedProduct/v3:subjectOf/v3:policy/v3:code/@displayName"/></xsl:if><br/> Initial U.S. Approval: <xsl:value-of select="/v3:document/v3:verifier/v3:time/@value"/></strong> <br/> </td> </tr> <xsl:for-each select="//v3:section[descendant::v3:highlight and not(ancestor::v3:section) and ./v3:code[descendant-or-self::[(self::v3:code or self::v3:translation) and @codeSystem='2.16.840.1.113883.6.1' and @code='34066-1']]]/v3:excerpt"> <tr> <td align="justify" vAlign="top" class="Warning"> <!--h1 class="Warning"--> <!-- this was changed at FDA's request and will now no longer display the title within the warning section --> <!--xsl:apply-templates mode="highlights" select=".."/--> <!--xsl:apply-templates mode="mixed" select="../v3:title"/--> <!--/h1--> <xsl:for-each select="v3:highlight/v3:text/node()[not(self::v3:title)]"> <xsl:choose> <xsl:when test="position() &lt; 3"> <h1 class="Warning"> <xsl:apply-templates mode="mixed" select="."/> </h1> </xsl:when> <xsl:otherwise> <xsl:apply-templates mode="mixed" select="."/> </xsl:otherwise> </xsl:choose> </xsl:for-each> </td> </tr> </xsl:for-each> <!-- apply templates to display the Recent Major Change section within the highlight section --> <xsl:apply-templates mode="highlights" select="//v3:section[descendant::v3:highlight/v3:text and not(ancestor::v3:section) and ./v3:code[@codeSystem='2.16.840.1.113883.6.1' and @code='43683-2']]/v3:excerpt"/> <xsl:for-each select="//v3:section[descendant::v3:highlight/v3:text and not(ancestor::v3:section) and not(./v3:code[@codeSystem='2.16.840.1.113883.6.1' and (@code='34066-1' or @code='43683-2')])]/v3:excerpt"> <xsl:if test="position() &lt; $numHighlightSections"> <xsl:apply-templates mode="highlights" select="."/> </xsl:if> </xsl:for-each> </tbody> </table> </td> <td width="50%" class="textHighlights" align="justify" vAlign="top"> <table cellSpacing="1" cellPadding="3" border="0"> <tbody> <xsl:for-each select="//v3:section[descendant::v3:highlight/v3:text and not(ancestor::v3:section) and not(./v3:code[@codeSystem='2.16.840.1.113883.6.1' and (@code='34066-1' or @code='43683-2')])]/v3:excerpt"> <xsl:if test="position() >= $numHighlightSections"> <xsl:apply-templates mode="highlights" select="."/> </xsl:if> </xsl:for-each> <tr> <xsl:variable name="sectionNumberSequence"> <xsl:apply-templates mode="sectionNumber" select="//v3:section[v3:code/@code = '34076-0']"/> </xsl:variable> <td align="justify" vAlign="top"> <strong> <xsl:choose> <xsl:when test="count(//v3:section[v3:code/@code = '34076-0']) > 0 and (count(//v3:section[v3:code/@code = '42231-1']) = 0 and count(//v3:section[v3:code/@code = '38056-8']) = 0 and count(//v3:section[v3:code/@code = '42230-3']) = 0)"> <br/>See <a href="#section-{substring($sectionNumberSequence,2)}">17</a> for PATIENT COUNSELING INFORMATION </xsl:when> <xsl:when test="count(//v3:section[v3:code/@code = '34076-0']) > 0 and (count(//v3:section[v3:code/@code = '38056-8']) > 0 or count(//v3:section[v3:code/@code = '42230-3']) > 0) and count(//v3:section[v3:code/@code = '42231-1']) = 0"> <br/>See <a href="#section-{substring($sectionNumberSequence,2)}">17</a> for PATIENT COUNSELING INFORMATION and FDA approved patient labeling </xsl:when> <xsl:when test="(count(//v3:section[v3:code/@code = '34076-0']) > 0 and count(//v3:section[v3:code/@code = '42231-1']) > 0) and (count(//v3:section[v3:code/@code = '38056-8']) = 0 or count(//v3:section[v3:code/@code = '42230-3']) = 0)"> <br/>See <a href="#section-{substring($sectionNumberSequence,2)}">17</a> for PATIENT COUNSELING INFORMATION and the FDA-approved Medication Guide </xsl:when> <xsl:when test="count(//v3:section[v3:code/@code = '34076-0']) > 0 and count(//v3:section[v3:code/@code = '42231-1']) > 0 and count(//v3:section[v3:code/@code = '38056-8']) > 0 and count(//v3:section[v3:code/@code = '42230-3']) > 0"> <br/>See <a href="#section-{substring($sectionNumberSequence,2)}">17</a> for PATIENT COUNSELING INFORMATION and the FDA-approved patient labeling and Medication Guide </xsl:when> </xsl:choose> </strong> </td> </tr> <tr> <td align="right" vAlign="top"><br/><strong><xsl:call-template name="effectiveDateHighlights"/></strong></td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <hr/> </xsl:template> <xsl:template mode="highlights" match="/|@|node()"> <xsl:param name="class" select="."/> <xsl:apply-templates mode="highlights" select="@|node()"> <xsl:with-param name="class" select="$class"/> </xsl:apply-templates> </xsl:template> <xsl:template mode="highlights" match="v3:excerpt"> <xsl:variable name="currentCode" select="ancestor::v3:section//v3:code/@code"/> <xsl:variable name="standardSection" select="$standardSections//v3:section[@code=$currentCode]"/> <xsl:variable name="sectionNumber" select="$standardSection/@number"/> <xsl:variable name="ARSection" select="$standardSections//v3:section[@code='34084-4']"/> <xsl:variable name="ARNumber" select="$ARSection[1]/@number"/> <xsl:variable name="currentSectionNum"> <xsl:apply-templates mode="sectionNumber" select="ancestor-or-self::v3:section"/> </xsl:variable> <tr> <td align="justify" vAlign="top"> <div class="DotleaderTop"/> <h1 class="Highlights"> <!-- this was changed at FDA request and will now display the standard section title rather than what is coded in the label --> <xsl:apply-templates mode="highlights" select=".."/> <!--xsl:apply-templates mode="mixed" select="../v3:title"/--> </h1> <div class="DotleaderBot"/> <xsl:apply-templates mode="mixed" select="@|node()[not(self::v3:title)]"/><br/> </td> </tr> <xsl:if test="../v3:code[@codeSystem='2.16.840.1.113883.6.1' and @code='34084-4']"> <xsl:call-template name="suspectedARboilerPlate"/> </xsl:if> <xsl:if test="not(../../../v3:component/v3:section[v3:code[@codeSystem='2.16.840.1.113883.6.1' and @code='34084-4']]/v3:excerpt/v3:highlight/v3:text) and (number($sectionNumber)+1 = number($ARNumber) or (number(substring($currentSectionNum,2)) = number($ARNumber) and $currentCode != '43683-2'))"> <xsl:call-template name="highlightNoAR"/> </xsl:if> </xsl:template> <xsl:template name="suspectedARboilerPlate"> <tr> <td width="50%" align="justify" vAlign="top"><strong><br/>To report SUSPECTED ADVERSE REACTIONS, contact <xsl:value-of select="/v3:document/v3:legalAuthenticator/v3:assignedEntity/v3:representedOrganization/v3:name"/> at <xsl:for-each select="/v3:document/v3:legalAuthenticator/v3:assignedEntity/v3:telecom"> <xsl:value-of select="@value"/> <xsl:if test="position() != last()">&#160;and&#160;</xsl:if> </xsl:for-each> or FDA at 1-800-FDA-1088 or <a href="http://www.fda.gov/medwatch&quot;&gt;www.fda.gov/medwatch&lt;/a&gt;&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;&lt;/td> </tr> </xsl:template> <xsl:template name="highlightNoAR"> <xsl:variable name="ARSection" select="$standardSections//v3:section[@code='34084-4']"/> <xsl:variable name="ARNumber" select="$ARSection[1]/@number"/> <tr> <td width="50%" align="justify" vAlign="top"> <div class="DotleaderTop"/> <h1 class="Highlights"> <!-- this was changed at FDA request and will now display the standard section title rather what is coded in the label --> <xsl:value-of select="$ARSection/v3:title"/> </h1> <div class="DotleaderBot"/> </td> </tr> <xsl:call-template name="suspectedARboilerPlate"/> </xsl:template> <!-- Put out section heading only for main sections that contain highlights elements. --> <xsl:template mode="highlights" match="v3:section[descendant::v3:highlight/v3:text and not(ancestor::v3:section)]"> <xsl:param name="class" select="."/> <xsl:param name="standardSection" select="$standardSections//v3:section[@code=current()/v3:code/descendant-or-self::[(self::v3:code or self::v3:translation) and @codeSystem='2.16.840.1.113883.6.1']/@code]"/> <xsl:choose> <xsl:when test="$standardSection[1]/v3:title"> <xsl:value-of select="$standardSection[1]/v3:title"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="v3:code/@displayName"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template mode="highlights" match="v3:highlight//v3:paragraph"> <p class="Highlights{@styleCode}"> <xsl:apply-templates select="v3:caption"/> <xsl:apply-templates mode="mixed" select="node()[not(self::v3:caption)]"/> <xsl:text> </xsl:text> <xsl:if test="not(following-sibling::v3:paragraph)"> <xsl:variable name="reference" select="ancestor::v3:highlight[1]/v3:reference"/> <xsl:apply-templates mode="reference" select=".|//v3:section[v3:id/@root=$reference/v3:section/v3:id/@root and not(ancestor::v3:reference)]"/> </xsl:if> </p> </xsl:template> <xsl:template mode="highlights" match="v3:highlight//v3:paragraph[@styleCode='Bullet']" priority="2"> <p class="HighlightsHanging"> <span class="Exdent">&#x2022;</span> <xsl:apply-templates select="v3:caption"/> <xsl:apply-templates mode="mixed" select="node()[not(self::v3:caption)]"/> <xsl:text> </xsl:text> <xsl:if test="not(following-sibling::v3:paragraph)"> <xsl:variable name="reference" select="ancestor::v3:highlight/reference"/> <xsl:apply-templates mode="reference" select=".|//v3:section[v3:id/@root=$reference/v3:section/v3:id/@root and v3:title]"/> </xsl:if> </p> </xsl:template> <xsl:template mode="highlights" match="v3:tr"/> <xsl:template mode="highlights" match="v3:highlight//v3:table"> <xsl:apply-templates select="."/> </xsl:template> <xsl:template mode="highlights" match="v3:content[@styleCode = 'xmChange']"> <p> <xsl:apply-templates select="@[not(local-name(.)='styleCode')]"/> <xsl:apply-templates mode="mixed" select="node()"/> </p> </xsl:template> <!-- MODE index --> <xsl:template name="index"> <xsl:variable name="numSections" select="number(count(//v3:section[v3:title != '']) div 2)"/> <table cellSpacing="0" cellPadding="3" width="100%" border="0"> <thead> <tr> <th colSpan="2" align="left">FULL PRESCRIBING INFORMATION: CONTENTS<A href="#footnote-content" name="footnote-reference-content"></A></th> </tr> </thead> <tfoot> <tr> <td colSpan="2"> <dl class="FootnoteContents"> <dt><A href="#footnote-reference-content" name="footnote-content">*</A></dt> <dd>Sections or subsections omitted from the full prescribing information are not listed</dd> </dl> </td> </tr> </tfoot> <tbody> <tr> <td width="50%" vAlign="top"> <p> <xsl:for-each select="//v3:section[v3:title != '']"> <xsl:if test="position() &lt; $numSections"> <xsl:apply-templates mode="index" select="."/> </xsl:if> </xsl:for-each> </p> </td> <td width="50%" vAlign="top"> <p> <xsl:for-each select="//v3:section[v3:title != '']"> <xsl:if test="position() &gt;= $numSections"> <xsl:apply-templates mode="index" select="."/> </xsl:if&g


Replies (3)

Please register to reply

RE: XTDE0410 error (XML + XSL samples) - Added by Anonymous almost 17 years ago

Legacy ID: #4560138 Legacy Poster: DjFac (djfac)

It seems the problem comes from the title tag As you can see, the xml file which does not work has a tag <content styleCode="italics"> included in the <title> tag contrary to the xml file which works well. DOES NOT WORK : <title mediaType="text/x-hl7-title+xml">CONCENTRATE<br /><content styleCode="italics">CAUTION: MUST BE DILUTED FOR I.V. USE</content><br />14.6%<br />SODIUM CHLORIDE Injection, USP</title> WORKS WELL: <title mediaType="text/x-hl7-title+xml">CONCENTRATE<br />CAUTION: MUST BE DILUTED FOR I.V. USE<br />14.6%<br />SODIUM CHLORIDE Injection, USP</title> I hope it will help you... :) Thank you again in advance Yohan

RE: XTDE0410 error (XML + XSL samples) - Added by Anonymous almost 17 years ago

Legacy ID: #4560186 Legacy Poster: Michael Kay (mhkay)

I'm sorry, but as far as I can see you are simply asking me to debug your code for you. I'm afraid that's not a service I can provide (unless paid). If you have evidence that Saxon isn't behaving according to specification, then you need to make this clear. Alternatively, if you are having trouble understanding an error message, please quote the error message and I will try and explain to you what it means. The fact that the error occurs on one input file and not another proves nothing - that is the nature of dynamic errors. You might get help on the xsl-list at mulberrytech.com, but I would advise cutting down your source files and stylesheet to the minimum needed to demonstrate the problem. Michael Kay

RE: XTDE0410 error (XML + XSL samples) - Added by Anonymous almost 17 years ago

Legacy ID: #4560211 Legacy Poster: DjFac (djfac)

Well, I'll find by myself, I've already found (previous post) where the error is raised... thus I think I won't really need your help. Regards, Y.

    (1-3/3)

    Please register to reply