- From: Fredrik Öhrström <oehrstroem@gmail.com>
- Date: Mon, 28 Jul 2025 10:32:22 +0200
- To: John Dziurlaj <john@turnout.rocks>
- Cc: ixml <public-ixml@w3.org>
- Message-ID: <CALZT+jAR-CD6hz=wEgmA=5wZtfiuBHYA6TWQEtVEWSb9rtiLPA@mail.gmail.com>
I belive that many ixml use cases will require an ixml parse which is followed by an xsl transform. The reason is that ixml does not offer rearranging of elements (excpet pushing them as attributes), nor the creation of dynamic elements names. I.e. you can parse xml using ixml, but you will not get the original xml from the ixml parse. An ixml parse of <row>123</row> could generate <element name="row"><text>123</text></element> this would then have to be sent through an xslt to rewrite it into the original xml. If you have mixed content like the pdf, then it seems like you would need to either keep it as as text string, which you currently do, and apply a secondary xml parse of this text. Or include an xml parser (perhaps using the future ixml modularity include, or write it yourself) to generate the xml-intermediate, then run xslt on the output to store the embedded xml as xml in the xml-version in the pdf. :-) //Fredrik Den sön 27 juli 2025 kl 14:29 skrev John Dziurlaj <john@turnout.rocks>: > In some cases, XML content may be encapsulated within non-XML container > formats. One such example is PDF, which can include XML as the payload of a > stream object. The parsed output from the iXML grammar escapes the XML, > which is usually not desired. > > > > E.g.: > > > > ``` > > 11 0 obj > > << > > /Length 165 > > >> > > stream > > <?xml version="1.0" encoding="UTF-8"?> > > <xdp:xdp xmlns:xdp=http://ns.adobe.com/xdp/ > timeStamp="2025-06-14T10:38:38Z" > uuid="73362f55-4354-43ac-8d58-512960664b11" /> > > endstream > > endobj > > ``` > > > > Produces: > > > > <stream-content><?xml version="1.0" encoding="UTF-8"?> > > <xdp:xdp xmlns:xdp=http://ns.adobe.com/xdp/ > timeStamp="2025-06-14T10:38:38Z" > uuid="73362f55-4354-43ac-8d58-512960664b11"> > > </stream-content> > > > > I imagine this could be handled with a pragma to produce: > > <?xml-decl version="1.0" encoding="UTF-8"?> > > <xdp:xdp xmlns:xdp=http://ns.adobe.com/xdp/ > timeStamp="2025-06-14T10:38:38Z" > uuid="73362f55-4354-43ac-8d58-512960664b11" /> > > > > Regards, > > > > John Dziurłaj /d͡ʑurwaj/ >
Received on Monday, 28 July 2025 08:32:54 UTC