[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Generating an internal subset?

Subject: Re: Generating an internal subset?
From: dvint@xxxxxxxxx
Date: Wed, 30 Jun 2010 14:17:50 -0700
Re:  Generating an internal subset?
>> Just wondering if there is a better way to do this.
>
> That's best you can do if you really need an internal subset.
> (using pure xslt, saxon has an extension to do this I believe)
> Better perhaps is use
> <!DOCTYPE dmodule SYSTEM "local.dtd">
>
> which you can generate using <xsl:output doctype-system="local.dtd"/>
>
> then you just haave to write local.dtd to look like (in total)
>
> 	<!ENTITY % ISOEntities PUBLIC "ISO 8879-1986//ENTITIES ISO Character
> Entities 20030531//EN//XML"
>   "http://www.s1000d.org/S1000D_3-0/ent/xml/ISOEntities">
> 	%ISOEntities;
>
>
>
>
> Note though that if you do this (or what you suggested) any xml parser
> using the file that you generate will (by default) need a network
> connection to that server (or to the w3c server if you use the current
> versions)

Yeah I have that problem when I try to process the files from the system
I'm trying to mimic. this may be a holdover from the SGML version of these
schemas for s1000D. Everything is managed by a CMS/CSDB and I'm not sure
what assumptions it makes, so I didn't want to loose the definition. My
editing environment uses XML catalogs and such to handle these files
locally, but my XSLT processing is hanging up on them.


>
>
> If the file is being generated by XSLT, unless you go to a lot of
> trouble with disable-output-escaping, it will nothave any entity
> references in it, so you should not need to define any entities, so why
> do you need to refer to these entity definitions?
>

Mainly so I don't have to figure out any dependencies in the commercial
CMS. This is what their templates generate. Maybe I will go ahead and file
a bug report with them. the editor we use can actually generate UTF-8,
numerical character entities or these named entities, so this may be the
way the CMS tries to handle the different combinations.

this was also an interesting exeercise as I hadn't thought about creating
an internal subset like this and had previously done this as you suggested
with the doctype-system parameter on <xsl:output>.

After sending this question, I came across the need to extract references
in the XML file to entity references and generate the following:

<!ENTITY RQ4-B-VTC-ECS1-CANCEL SYSTEM
"q:\csdb\graphics\library\vtc\ecs1\rq4-b-vtc-ecs1-cancel.cgm" NDATA cgm>
<!ENTITY RQ4-B-VTC-ECS1-ECSFANSFWD SYSTEM
"q:\csdb\graphics\library\vtc\ecs1\rq4-b-vtc-ecs1-ecsfansfwd.cgm" NDATA
cgm>
<!ENTITY RQ4-B-VTC-ECS1-MANCNTRL SYSTEM
"q:\csdb\graphics\library\vtc\ecs1\rq4-b-vtc-ecs1-mancntrl.cgm" NDATA cgm>
<!ENTITY RQ4-B-VTC-MAINT-ECS1 SYSTEM
"q:\csdb\graphics\library\vtc\maint\rq4-b-vtc-maint-ecs1.cgm" NDATA cgm>

So this actually prevent me from creating an external DTD as you suggested
as this list of entites is unique to a particular file and I can't
anticipate what the complete list might be.

..dan

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.