[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Working with entities and notations
I havea sitatuation where I need to process the following content: <!DOCTYPE dmodule [ <!ENTITY ICN-GAASIB0-01-32-00-00-G00-0A-0YJB5-00002-B-B-01 SYSTEM "ICN-GAASIB0-01-32-00-00-G00-0A-0YJB5-00002-B-B-01.cgm" NDATA cgm> <!ENTITY ICN-GAASIB0-01-32-13-01-G00-0A-0YJB5-00001-B-B-01 SYSTEM "ICN-GAASIB0-01-32-13-01-G00-0A-0YJB5-00001-B-B-01.cgm" NDATA cgm> ]> <dmodule> <graphic boardno="ICN-GAASIB0-01-32-13-01-G00-0A-0YJB5-00001-B-B-01"> <graphic boardno="ICN-GAASIB0-01-32-00-00-G00-0A-0YJB5-00002-B-B-01"> </dmodule> The <graphic> has the following schema definition: <xs:element name="graphic" type="graphicType"/> <xs:complexType name="graphicType"> <xs:sequence> <xs:element minOccurs="0" ref="applic"/> <xs:element maxOccurs="unbounded" minOccurs="0" ref="hotspot"/> <xs:element maxOccurs="unbounded" minOccurs="0" ref="rfa"/> </xs:sequence> <xs:attribute ref="refapplic"/> <xs:attribute ref="boardno" use="required"/> <xs:attribute ref="reprowid"/> <xs:attribute ref="reprohgt"/> <xs:attribute ref="reproscl"/> <xs:attributeGroup ref="bodyatt"/> <xs:attributeGroup ref="cntlcontent"/> <xs:attributeGroup ref="secur"/> <xs:attributeGroup ref="xlink:XLINKATT0"/> </xs:complexType> I can see how unparsed-entity-uri() will get me the SYSTEM information by using the boardno attribute on the graphic tag. My problem is that I don't see anyway to extract the notation or NDATA value. I know I have at least CGM and ISO (IsoDraw) notations that I need to work with, so I can't just default to CGM. I'm trying to convert this XML file and produce a slightly modified one without changing the schema or the existing markup. My only thought currently is to preprocess with Perl or something - make some new dummy tags with the information and then do my actual pass using that info and stripping out the intermediate tags. Seems like there should be a better way. ..dan
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|