Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 994289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:33:08+00:00 2026-05-16T06:33:08+00:00

I am using about a dozen XSLT files to provide a large number of

  • 0

I am using about a dozen XSLT files to provide a large number of output formats. At the moment the user has to know the extension of the file format being exported to e.g. RTF, HTML, TXT.

I would also like to use parameters to allow more options. If I can embed the metadata in the XSL file itself then I can pick up the details by scanning through the files.

Here is what I am thinking about. In this example the program would have to parse the comments for the required information.

<?xml version="1.0" encoding="UTF-8"?>
<!-- Title: Export to Rich Text Format -->
<!-- Description: This Stylesheet converts to a Rich Text Format format which may be used in a word processor such as Word -->
<!-- FileFormat: RTF -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:param name="CompanyName"/> <!-- Format:String, Description: Company name to be inserted in the footer -->
<xsl:param name="DateDue"/> <!-- Format:Date-yyyy-mm-dd, Description: Date Due -->
<xsl:param name="IncludePicture">true</xsl:param><!-- Format:Boolean, Description: Do you want to include a graphical representation? -->
  <xsl:template match="/">
  <!-- Stuff -->
  </xsl:template>
</xsl:stylesheet>

Are there any standards out there? Do I need to butcher more than one (Dublin Core with a smattering of XML Schema)?

P.S. the project this is being applied to is Argumentative.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T06:33:08+00:00Added an answer on May 16, 2026 at 6:33 am

    Here is what I am thinking about. In
    this example the program would have to
    parse the comments for the required
    information.

    You don’t need to code the metadata within comments.

    Metadata can be specified as part of the XSLT stylesheet using ordinary XML markup — as rich in structure and meaning as we need.

    Here is an example how to do that:

    <xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns:meta="my:meta">
     <xsl:output method="text"/>
    
     <meta:metadata>
       <title>Title: Export to Rich Text Format </title>
       <description>
        This Stylesheet converts to a Rich Text
        Format format which may be used in a word processor
        such as Word
       </description>
       <fileFormat>RTF</fileFormat>
       <parameters>
         <parameter name="CompanyName" format="xs:string"
          Description="Company name to be inserted in the footer"/>
    
         <parameter name="DateDue" format="xs:date"
          Description="Date Due"/>
    
         <parameter name="IncludePicture" format="xs:boolean"
          Description="Do you want to include a graphical representation?"/>
       </parameters>
     </meta:metadata>
    
     <xsl:param name="CompanyName"/>
     <xsl:param name="DateDue"/>
     <xsl:param name="IncludePicture" select="true"/>
    
     <xsl:variable name="vMetadata" select=
          "document('')/*/meta:metadata"/>
    
     <xsl:template match="/">
      This is a demo how we can access and use the metadats.
    
      Metadata --> Description:
    
      "<xsl:copy-of select="$vMetadata/description"/>"
     </xsl:template>
    </xsl:stylesheet>
    

    when this transformation is applied on any XML document (not used), the result is:

      This is a demo how we can access and use the metadats.
    
      Metadata --> Description:
    
      "
        This Stylesheet converts to a Rich Text
        Format format which may be used in a word processor
        such as Word
       "
    

    Do note:

    1. Any element that is in a namespace (of course not the no-namespace and not the xsl namespace) can be specified at the global level of any xslt stylesheet.

    2. Such elements can be accessed using the xslt function document().

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Where I work at, we have about 2 dozen or more projects, using SVN
I read about using <context:component-scan base-package=tld.mydomain.business> <context:include-filter type=annotation expression=org.springframework.stereotype.Service/> </context:component-scan> and annotate my service
I'm thinking about using the java application object to implement a simple cache, to
Yesterday I asked about using an exlusive maven repository, now it turns I need
I am thinking about using Gears in a project, but I have doubts about
I am learning about using the checkmark cell accessory and am wondering why the
I'm thinking about using a ViewFlipper for an Wizard like Activity. But I see
I am wondering about using the abstraction in Zend Db RowSet instead of joins,
I am confused about using php or python for implementing server program . I
I'm asking about using a Twitter Bootstrap modal window with a Rails form helper

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.