[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: Processing XML files with entity and notation dec
Subject: Re: Processing XML files with entity and notation declarations
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Sat, 22 Sep 2012 10:02:10 +0100
|
There's an extension/plug-in written by Andrew Welch that exposes
DOCTYPE information to the transformation - I forget the name but
perhaps someone on the list will be able to point to it.
Michael Kay
Saxonica
On 22/09/2012 06:30, Dan Vint wrote:
I'll have to look at these. I had been using a sort of reverse lookup
to find the entity declarations with the unparsed-entity-uri(). The
saxon:doctype extensions look interesting, but the seem to be more
oriented towards build something you know rather than processing the
existing doctype information. These may make some of my current code a
little easier, in particular the dtd:entity.
What I would really like to have is something like:
<xsl:template match="DOCTYPE">
<xsl:copy-of/>
</xsl:template>
My current approach only works because I have a limited set of things
in the internal declaration. For instance, I have to guess the
notation type of the graphic by parsing the filename reference and
looking at the extension to then make my own declaration for the
notation. I can only get to entity declarations that are used in the
content. So if the writer had created references to some extra
graphics (with the intention of using them) I would not be able to
recreate those items. Again in my situation, these files are released,
rather than in work, so I know if a graphic isn't referenced that it
is not needed.
At 10:04 PM 9/21/2012, you wrote:
Hi Dvint,
There are 2 options to copy / recreate.
1. to copy you have to use unparsed-text() function and use regex to
capture the entity notation area and copy to resulting output
2. To recreate use have to use saxon:doctype. Refer this site for
example.
http://saxon.sourceforge.net/saxon7.9.1/extensions.html#saxon:doctype
Regards,
Ganesh
On Sat, Sep 22, 2012 at 2:21 AM, David Carlisle <davidc@xxxxxxxxx>
wrote:
> On 21/09/2012 21:27, dvint@xxxxxxxxx wrote:
>>
>> I think the answer to my question (coming up) is going to be I have
>> to live with it, but I was just wondering if folks had some alternate
>> ideas
>
>
> I'm not quite sure what the question is but I suspect the answer might
> involve the functions unparsed-entity-uri() and
> unparsed-entity-public-id() might be part of the answer.
>
> David
>
> --
> google plus: https:/profiles.google.com/d.p.carlisle
---------------------------------------------------------------------------
Danny Vint
Panoramic Photography
http://www.dvint.com
voice: 619-938-3610
|
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
RSS 2.0 |
|
Atom 0.3 |
|
|