XSL, XSLT frustration

B

Badbetty

Hello Readers

I need a solution stylesheet that will transform XML to XML. However I
want the stylesheet to output a complete stylesheet tag too i.e. <?
xsl:stylesheet version..... ?> to the resultant XML document.


Any ideas please? I hope Ihave explained it all well enough.


Thank you
BB
 
K

Ken Starks

Badbetty said:
Hello Readers

I need a solution stylesheet that will transform XML to XML. However I
want the stylesheet to output a complete stylesheet tag too i.e. <?
xsl:stylesheet version..... ?> to the resultant XML document.


Any ideas please? I hope Ihave explained it all well enough.


Thank you
BB
I expect you want the <xsl:pi>...</xsl:pi> element.

Putting a stylesheet 'processing instruction' (not the same as an
opening tag) into the XML is not something I would do myself. I
prefer to allow for different outputs from the same source.
 
P

Peter Flynn

Ken said:
I expect you want the <xsl:pi>...</xsl:pi> element.

Putting a stylesheet 'processing instruction' (not the same as an
opening tag) into the XML is not something I would do myself. I
prefer to allow for different outputs from the same source.

If you are controlling the document generation, then you will continue
to allow for this. Adding a stylesheet PI is simply a way to recommend
to the downstream user "if you want to see this the way I suggest, use
this stylesheet". You may in many cases be dealing with users who would
have no clue what to do with an XML file and may just blindly open it in
a browser, expecting it to do something meaningful...

///Peter
 
K

Ken Starks

Peter said:
If you are controlling the document generation, then you will continue
to allow for this. Adding a stylesheet PI is simply a way to recommend
to the downstream user "if you want to see this the way I suggest, use
this stylesheet". You may in many cases be dealing with users who would
have no clue what to do with an XML file and may just blindly open it in
a browser, expecting it to do something meaningful...

///Peter

Thanks Peter. Yes, I thought of this about five minutes after sending
my response. I realised that I include a stylesheet PI quite regularly
in work for a charitable organisation sometimes work for.

They do indeed use the filing system not a server, and just click on it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top